33 references to Round
Microsoft.Maui.Graphics (6)
PointF.cs (2)
79 return new PointF(MathF.Round(X), MathF.Round(Y));
RectF.cs (4)
210 return new RectF(MathF.Round(X), MathF.Round(Y), MathF.Round(Width), MathF.Round(Height));
Microsoft.Maui.Graphics.Skia (2)
SkiaImage.cs (2)
149 canvas.DrawImage(this, dirtyRect.Left, dirtyRect.Top, MathF.Round(dirtyRect.Width), MathF.Round(dirtyRect.Height));
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1362public static Half Round(Half x) => (Half)MathF.Round((float)x);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MathF.cs (2)
168float roundedResult = Round(divisionResult); 410return Round(x);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (1)
1475return (T)(object)MathF.Round((float)(object)value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
674public static float Round(float x) => MathF.Round(x);
System.Windows.Forms (20)
System\Windows\Forms\Rendering\Button\PopupButtonColorMath.cs (6)
86(int)MathF.Round(alpha * 255f), 92=> (int)MathF.Round( 108int r = (int)MathF.Round(baseColor.R + ((target.R - baseColor.R) * amount)); 109int g = (int)MathF.Round(baseColor.G + ((target.G - baseColor.G) * amount)); 110int b = (int)MathF.Round(baseColor.B + ((target.B - baseColor.B) * amount)); 147int gray = (int)MathF.Round(GetLuminance(color) * 255f);
System\Windows\Forms\Rendering\Button\PopupButtonKeyCapRenderer.cs (14)
144int sideClearance = Math.Max(1, (int)MathF.Round(Metrics.SideClearanceDip * scale)); 145int pressTravel = Math.Max(1, (int)MathF.Round(Metrics.PressTravelDip * scale)); 146int defaultBorderIncrease = Math.Max(1, (int)MathF.Round(scale)); 148int rim = Math.Max(2, (int)MathF.Round(3f * scale)); 297int inset = metrics.BorderWidth + Math.Max(2, (int)MathF.Round(2f * metrics.Scale)); 455? Math.Max(1, (int)MathF.Round(scale)) 510int inset = Math.Max(1, (int)MathF.Round(1.5f * context.DeviceDpi / 96f)); 540int gap = Math.Max(2, (int)MathF.Round(4f * context.DeviceDpi / 96f)); 748int sideClearance = Math.Max(1, (int)MathF.Round(SideClearanceDip * scale)); 749int pressTravel = Math.Max(1, (int)MathF.Round(PressTravelDip * scale)); 753? Math.Max(1, (int)MathF.Round(scale)) 766(int)MathF.Round(press * PressTravelDip * scale), 770int rim = Math.Max(2, (int)MathF.Round(3f * scale)); 819TextReliefOffset = Math.Max(1, (int)MathF.Round(0.8f * scale))