Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

For the float-aware Point class, a rounding mode has been introduced to store in which way the Point needs to be rounded when necessary. For rectangles, this has not been implemented yet and is added by this change. It also correct the way in which rectangle values are rounded by considering the top-left and bottom-right corner instead of top-left corner and width/height, also done in the Win32DPIUtils. So it streamlines the rounding behavior in Win32DPIUtils and the Rectangle class to uniformly scale the upper left and bottom right corner of a rectangle.

The changes also makes proper use of the floating-precision coordinates in the point/pixel conversions for rectangles in the Win32DPIUtils.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

Test Results

  118 files  + 3    118 suites  +3   15m 25s ⏱️ + 4m 24s
4 650 tests +37  4 633 ✅ +36  17 💤 +1  0 ❌ ±0 
  330 runs  +18    326 ✅ +17   4 💤 +1  0 ❌ ±0 

Results for commit c23483c. ± Comparison against base commit 4722846.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review October 30, 2025 18:45
For the float-aware Point class, a rounding mode has been introduced to
store in which way the Point needs to be rounded when necessary. For
rectangles, this has not been implemented yet and is added by this
change. It also correct the way in which rectangle values are rounded by
considering the top-left and bottom-right corner instead of top-left
corner and width/height, also done in the Win32DPIUtils. So it
streamlines the rounding behavior in Win32DPIUtils and the
Rectangle class to uniformly scale the upper left and bottom right
corner of a rectangle.

The changes also makes proper use of the floating-precision coordinates
in the point/pixel conversions for rectangles in the Win32DPIUtils.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent rounding implementation for Rectangles

1 participant