Core\CSharp\MS\Internal\Ink\Lasso.cs (19)
150if (DoubleUtil.AreClose(lassoPoint.X, point.X))
156DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X)) &&
157DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
166if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
171else if (DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X)))
177double x = prevLassoPoint.X + (lassoSegment.X / lassoSegment.Y) * (point.Y - prevLassoPoint.Y);
178if (DoubleUtil.GreaterThanOrClose(point.X, x))
724intersectionPoint.X = points[i].X + (intersection - i) * (points[i + 1].X - points[i].X);
Core\CSharp\MS\Internal\Media3D\GeneralTransform2Dto3Dto2D.cs (48)
61_p1Transformed = new Point(projPoint1.X, projPoint1.Y);
62_p2Transformed = new Point(projPoint2.X, projPoint2.Y);
515if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) ||
516(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) ||
619if (Math.Abs(visUV1.X - visUV2.X) > Math.Abs(visUV1.Y - visUV2.Y))
621if (visUV1.X <= visUV2.X)
632if (triUV1.X <= triUV2.X)
651if (minVisUV.X < minTriUV.X)
659p1 = minTri3D + (minVisUV.X - minTriUV.X) / (maxTriUV.X - minTriUV.X) * (maxTri3D - minTri3D);
663if (maxVisUV.X > maxTriUV.X)
671p2 = minTri3D + (maxVisUV.X - minTriUV.X) / (maxTriUV.X - minTriUV.X) * (maxTri3D - minTri3D);
753double dx = p2.X - p1.X;
760coinc = (o.X == p1.X);
765return (p2.X - o.X) / d.X;
770double numer = (o.X - p1.X) * dy / dx - o.Y + p1.Y;
776double b0 = -o.X * dy / dx + o.Y;
777double b1 = -p1.X * dy / dx + p1.Y;
933if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) ||
934(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) ||
1124if (ptRelToCapture.X <= _visualBounds.Left + 1) ptRelToCapture.X -= BUFFER_SIZE;
1126if (ptRelToCapture.X >= _visualBounds.Right - 1) ptRelToCapture.X += BUFFER_SIZE;
Core\CSharp\MS\Internal\TextFormatting\LineServicesRun.cs (15)
270inkBoundingBox.X += glyphRun.BaselineOrigin.X;
344xy = new Point(line.Formatter.IdealToReal(line.ParagraphWidth, line.PixelsPerDip) - vectorToOrigin.X - u + origin.X, v + origin.Y);
348xy = new Point(u + vectorToOrigin.X + origin.X, v + origin.Y);
377xy = new Point(line.Formatter.IdealToReal(line.ParagraphWidth - u, line.PixelsPerDip) - vectorToOrigin.X + origin.X, line.Formatter.IdealToReal(v, line.PixelsPerDip) + origin.Y);
381xy = new Point(line.Formatter.IdealToReal(u, line.PixelsPerDip) + vectorToOrigin.X + origin.X, line.Formatter.IdealToReal(v, line.PixelsPerDip) + origin.Y);
411nominalX = line.ParagraphWidth - u + TextFormatterImp.RealToIdeal(-vectorToOrigin.X + origin.X);
415nominalX = u + TextFormatterImp.RealToIdeal(vectorToOrigin.X + origin.X);
447if(DoubleUtil.AreClose(rect.TopLeft.X, rect.BottomRight.X))
Core\CSharp\System\Windows\Interop\HwndSource.cs (9)
1043NativeMethods.RECT rect = new NativeMethods.RECT(0, 0, (int)pt.X, (int)pt.Y);
1070size = new Point(DoubleUtil.DoubleToInt(size.X), DoubleUtil.DoubleToInt(size.Y));
1074size = new Point(Math.Ceiling(size.X), Math.Ceiling(size.Y));
1376return new Size(convertedPt.X, convertedPt.Y);
1665Point relevantPt = new Point(pt.X, pt.Y);
1671NativeMethods.RECT rect = new NativeMethods.RECT(0, 0, (int)pt.X, (int)pt.Y);
1683(_sizeToContent == SizeToContent.Width ? double.PositiveInfinity : relevantPt.X),
1712else if (_sizeToContent == SizeToContent.Height) sz = new Size(relevantPt.X, rootUIElement.DesiredSize.Height);
1713else sz = new Size(relevantPt.X, relevantPt.Y);
src\Framework\MS\Internal\Ink\LassoHelper.cs (20)
234if (DoubleUtil.AreClose(lassoPoint.X, point.X))
241&& DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X))
242&& DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
251if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
257if ((0 == i) && DoubleUtil.AreClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
262else if (DoubleUtil.GreaterThanOrClose(point.X, Math.Min(prevLassoPoint.X, lassoPoint.X)))
267double x = prevLassoPoint.X + (lassoSegment.X / lassoSegment.Y) * (point.Y - prevLassoPoint.Y);
269if (DoubleUtil.GreaterThanOrClose(point.X, x))
272if ((0 == i) && DoubleUtil.AreClose(point.X, x))
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (15)
163new Point(_columnHeaderDragCurrentPosition.X - _columnHeaderDragStartRelativePosition.X, 0),
571_columnHeaderDragCurrentPosition.X - _columnHeaderDragStartPosition.X,
649return DoubleUtil.GreaterThan(Math.Abs(currentPos.X - originalPos.X), SystemParameters.MinimumHorizontalDragDistance);
713DragStartedEventArgs dragStartedEventArgs = new DragStartedEventArgs(_columnHeaderDragStartPosition.X, _columnHeaderDragStartPosition.Y);
849_columnHeaderDragCurrentPosition.X - _columnHeaderDragStartPosition.X,
941if (startPos.X < 0.0)
984headerStartX = transform.Transform(originPoint).X;
988if (DoubleUtil.LessThanOrClose(startPos.X, headerStartX))
993if (DoubleUtil.GreaterThanOrClose(startPos.X, headerStartX) &&
994DoubleUtil.LessThanOrClose(startPos.X, headerEndX))
999if (DoubleUtil.GreaterThanOrClose(startPos.X, headerMidX))
src\Framework\System\Windows\Controls\Primitives\TickBar.cs (25)
466dc.DrawLine(pen, startPoint, new Point(startPoint.X + tickLen, startPoint.Y));
467dc.DrawLine(pen, new Point(startPoint.X, endPoint.Y),
468new Point(startPoint.X + tickLen, endPoint.Y));
472xLines.Add(startPoint.X);
474xLines.Add(startPoint.X + tickLen);
476xLines.Add(startPoint.X + tickLen2);
503new Point(startPoint.X, y),
504new Point(startPoint.X + tickLen2, y));
520new Point(startPoint.X, y),
521new Point(startPoint.X + tickLen2, y));
534Point pt0 = new Point(startPoint.X, y0);
535Point pt1 = new Point(startPoint.X + tickLen2, y0);
536Point pt2 = new Point(startPoint.X + tickLen2, y0 + Math.Abs(tickLen2) * progression);
547pt0 = new Point(startPoint.X, y0);
548pt1 = new Point(startPoint.X + tickLen2, y0);
549pt2 = new Point(startPoint.X + tickLen2, y0 - Math.Abs(tickLen2) * progression);
573dc.DrawLine(pen, startPoint, new Point(startPoint.X, startPoint.Y + tickLen));
574dc.DrawLine(pen, new Point(endPoint.X, startPoint.Y),
575new Point(endPoint.X, startPoint.Y + tickLen));
579xLines.Add(startPoint.X - 0.5);
581xLines.Add(startPoint.X - 0.5);
607double x = adjustedTick * logicalToPhysical + startPoint.X;
623double x = i * logicalToPhysical + startPoint.X;
638double x0 = (SelectionStart - Minimum) * logicalToPhysical + startPoint.X;
651x0 = (SelectionEnd - Minimum) * logicalToPhysical + startPoint.X;
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (10)
557_window.Left = adjustedTopLeft.X;
966_window.Left = _windowPosAtStartOfUserMove.X;
1228double topLeftRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.TopLeft, 0), dpi.DpiScaleX, dpi.DpiScaleY).X;
1244double topRightRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.TopRight, 0), dpi.DpiScaleX, dpi.DpiScaleY).X;
1252double bottomLeftRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.BottomLeft, 0), dpi.DpiScaleX, dpi.DpiScaleY).X;
1260double bottomRightRadius = DpiHelper.LogicalPixelsToDevice(new Point(_chromeInfo.CornerRadius.BottomRight, 0), dpi.DpiScaleX, dpi.DpiScaleY).X;
1463if (mousePosition.X >= windowPosition.Left && mousePosition.X < windowPosition.Left + (int)_chromeInfo.ResizeBorderThickness.Left)
1467else if (mousePosition.X < windowPosition.Right && mousePosition.X >= windowPosition.Right - _chromeInfo.ResizeBorderThickness.Right)
src\Framework\System\Windows\Window.cs (49)
2615param.SetPosition((int)screenTopLeft.X, (int)screenTopLeft.Y);
2765_actualLeft = currentLocationLogicalUnits.X;
2783if ((!DoubleUtil.IsNaN(requestedWidth)) && (!DoubleUtil.AreClose(sizeDeviceUnits.Width, requestedSizeDeviceUnits.X)))
2790sizeDeviceUnits.Width = requestedSizeDeviceUnits.X;
2817if (!DoubleUtil.IsNaN(requestedLeft) && (!DoubleUtil.AreClose(xDeviceUnits, requestedLocationDeviceUnits.X)))
2820xDeviceUnits = requestedLocationDeviceUnits.X;
2854if (!Double.IsPositiveInfinity(maxSizeDeviceUnits.X) && (sizeDeviceUnits.Width > maxSizeDeviceUnits.X))
2857sizeDeviceUnits.Width = maxSizeDeviceUnits.X;
2866if (sizeDeviceUnits.Width < minSizeDeviceUnits.X)
2869sizeDeviceUnits.Width = minSizeDeviceUnits.X;
3000if (CalculateWindowLocation(ref xDeviceUnits, ref yDeviceUnits, new Size(newSizeDeviceUnits.X, newSizeDeviceUnits.Y)))
3121DoubleUtil.DoubleToInt(ptDeviceUnits.X),
3169UpdateHwndSizeOnWidthHeightChange(sizeLogicalUnits.X, newHeight);
3549mm.minWidth = Math.Max(this.MinWidth, minSizeLogicalUnits.X);
3554mm.maxWidth = Math.Min(MinWidth, maxSizeLogicalUnits.X);
3560mm.maxWidth = Math.Min(MaxWidth, maxSizeLogicalUnits.X);
3564mm.maxWidth = maxSizeLogicalUnits.X;
3938ownerRectDeviceUnits = new Rect(ownerLocationDeviceUnits.X, ownerLocationDeviceUnits.Y,
3939ownerSizeDeviceUnits.X, ownerSizeDeviceUnits.Y);
4102return new Rect(locationDeviceUnits.X, locationDeviceUnits.Y, sizeDeviceUnits.X, sizeDeviceUnits.Y);
4116return new Rect(locationLogicalUnits.X, locationLogicalUnits.Y, sizeLogicalUnits.X, sizeLogicalUnits.Y);
4824SetValue(FrameworkElement.WidthProperty, ptLogicalUnits.X);
4896_windowMaxWidthDeviceUnits = Math.Max(_windowMaxWidthDeviceUnits, windowSize.X);
4990if (!DoubleUtil.AreClose(_actualLeft, ptLogicalUnits.X) ||
4993_actualLeft = ptLogicalUnits.X;
5102mmi.ptMinTrackSize.x = DoubleUtil.DoubleToInt(minSizeDeviceUnits.X);
5105mmi.ptMaxTrackSize.x = DoubleUtil.DoubleToInt(maxSizeDeviceUnits.X);
5184if ((mousePositionWRTResizeGripControl.X < 0) ||
5186(mousePositionWRTResizeGripControl.X > _resizeGripControl.RenderSize.Width) ||
6030UpdateHwndSizeOnWidthHeightChange(logicalSize.X, minHeight);
6068UpdateHwndSizeOnWidthHeightChange(logicalSize.X, maxHeight);
6126if (minWidth > logicalSize.X)
6163if (maxWidth < logicalSize.X)
6193double convertedValue = (LogicalToDeviceUnits(new Point(newValue, 0))).X;
6234newLeft = TransformWorkAreaScreenArea(new Point(newLeft, 0), TransformType.ScreenAreaToWorkArea).X;
6236newLeft = (LogicalToDeviceUnits(new Point(newLeft, 0))).X;
6296retPt = new Point(pt.X + deltaX, pt.Y + deltaY);
6300retPt = new Point(pt.X - deltaX, pt.Y - deltaY);
6530DoubleUtil.DoubleToInt(ptDeviceUnits.X),
7489if (!double.IsNaN(_prePanningLocation.X) && !double.IsNaN(_prePanningLocation.Y) && (_swh != null))
7494return new Point(point.X - (_prePanningLocation.X - windowLocation.X), point.Y - (_prePanningLocation.Y - windowLocation.Y));
8102return new Size(pt.X,pt.Y);
8135return new Size(Math.Max(0.0, pt.X), Math.Max(0.0, pt.Y));
8479X = LogicalTopLeft.X * dpiScaleX,