LayoutRounding.SnapRectEdgesToPixelsOutward method
Snaps a rectangle outward (floor left/top, ceil right/bottom) so it never shrinks.
public static Rect SnapRectEdgesToPixelsOutward(Rect rect, double dpiScale)Remarks
Section titled “Remarks”A small epsilon tolerance prevents floating-point round-trip errors (e.g. Floor((16/1.5 + 2/1.5) * 1.5) yielding 17 instead of 18) from shifting edges by an extra device pixel.
See Also
Section titled “See Also”- struct Rect
- class LayoutRounding
- namespace Aprillz.MewUI