-
Notifications
You must be signed in to change notification settings - Fork 185
Streamline rounding for rectangles and add rounding mode to them #2720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
akoch-yatta
merged 1 commit into
eclipse-platform:master
from
vi-eclipse:rectangle-rounding-mode
Oct 31, 2025
+67
−45
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember there were cases in the past where some places would have different results when you would scale the rectangle using scaleBounds or scaleUp because they both used different approach to scaling. One had height and width calculated using the difference between top left and bottom right and the other as just the width and height values in the object. Are we sure that this approach would not break that behavior for certain consumers? Visually I cannot see anything in the IDE but I just wanted to pick this out just to be careful. I am going to consider that since there's no test failing, this might not be the case anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no way to be 100% sure that we to not break any behavior for existing consumers. With all the back-and-forth of the kinds of rounding we have implemented, this will probably also have effects that we currently do not see (either positive or negative).
Regarding the different scaling methods that you mention: they are still in place. We still have
Win32DPIUtils#scaleBounds()which implement the "other" way of scaling (used for things related to image). The modified way of scaling only applies to what is passed toWin32DPIUtils#pointToPixel()/pixelToPoint(). And there the only removed case distinction is that when aRectangle.OfFloatwas passed, no forwarding toscaleBounds()happens anymore.