Skip to content
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

Fix incorrect crop tooltip when rotating #1073

Merged
merged 1 commit into from
May 20, 2024

Conversation

leejuyuu
Copy link
Collaborator

Fixes #1071

The tooltip of the crop tool displays the center coordinates of the crop rectangle when it is rotated, however, the displayed value changes when we rotate around the center.

The value is incorrect because the center is not properly translated before applying the rotation transform, which rotates around the origin. This patch calculates the coordinates to be displayed considering only the translation because rotation around the center should not change its position.

Fixes nomacs#1071

The tooltip of the crop tool displays the center coordinates of the crop
rectangle when it is rotated, however, the displayed value changes when
we rotate around the center.

The value is incorrect because the center is not properly translated
before applying the rotation transform, which rotates around the
origin. This patch calculates the coordinates to be displayed
considering only the translation because rotation around the center
should not change its position.
@novomesk novomesk merged commit 0badf1b into nomacs:master May 20, 2024
1 check passed
@leejuyuu leejuyuu deleted the 1071-crop-rotation-tooltip branch May 25, 2024 13:53
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.

Crop tooltip displays incorrect center coordinates when rotating
2 participants