Fix uniform expansion of rectangle shapes#1733
Merged
Merged
Conversation
stefan-dangl
commented
Sep 7, 2025
Contributor
- Before, due to numerical inaccuracy rectangles were not expanded uniformly but rather drifted to one side.
- improving readability of RectangleHandler by changing magic numbers to enum.
Member
|
Could you perhaps record a quick video showing the drifting issue? I didn't notice it in my testing but I'm probably missing something |
Contributor
Author
|
Sure. Here are the videos: Current version: current-version.mp4Fixed version: fixed-version.mp4Notes:
|
cameronwhite
left a comment
Member
There was a problem hiding this comment.
Thanks for the video! I had only been testing with the corner handles, which didn't show the issue
| active_handle = handles[HandlePoint.LowerRight]; | ||
| } | ||
|
|
||
| private bool IsHigherThenWide () |
Member
There was a problem hiding this comment.
Small nitpick - this should be Than instead of Then
Contributor
Author
There was a problem hiding this comment.
Good catch! Fixed.
- Before, due to numerical inaccuracy rectangles were not expanded uniformly but rather drifted to one side. - improving readability of RectangleHandler by changing magic numbers to enum.
- Change handles array to dictionary to improve readability
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.