Skip to content

[Window] Fix transforms being offset by 0.5x0.5 #20454

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
merged 5 commits into from
Feb 22, 2024
Merged

Conversation

Foda
Copy link
Member

@Foda Foda commented Feb 8, 2024

Description of Change

This PR fixes rotations being offset by 0.5 px in each direction. The property CenterX and CenterY are not normalized (0.0 - 1.0), therefore, setting them offset the transform. Additionally, we already set the RenderTransformOrigin a few lines up.

Recording.2024-02-08.141241.mp4

Issues Fixed

Fixes #17694

@Foda Foda added platform/windows area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing partner Issue or Request from a partner team labels Feb 8, 2024
@Foda Foda requested review from PureWeen and jsuarezruiz February 8, 2024 22:13
@Foda Foda requested a review from a team as a code owner February 8, 2024 22:13
Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add an UITest with the example from the video where a button is pressed, an Ellipse is rotated and after finishing the animation verify the Ellipse position? It can be done easily using the VerifyScreenshot method. Example:

@rmarinho
Copy link
Member

And needs rebase too please

@Foda
Copy link
Member Author

Foda commented Feb 12, 2024

Could we add an UITest with the example from the video where a button is pressed, an Ellipse is rotated and after finishing the animation verify the Ellipse position? It can be done easily using the VerifyScreenshot method. Example:

Added!

@Foda
Copy link
Member Author

Foda commented Feb 12, 2024

/rebase

@github-actions github-actions bot force-pushed the foda/RotationTransform branch from 0e5beab to 979256f Compare February 12, 2024 23:11
@Foda Foda requested review from jsuarezruiz and a team February 15, 2024 18:24
mattleibow
mattleibow previously approved these changes Feb 16, 2024
@mattleibow
Copy link
Member

/rebase

@github-actions github-actions bot force-pushed the foda/RotationTransform branch from 6f33a89 to c3f5cf1 Compare February 16, 2024 19:41
jsuarezruiz
jsuarezruiz previously approved these changes Feb 19, 2024
@jsuarezruiz jsuarezruiz self-requested a review February 19, 2024 12:35
@Foda Foda dismissed stale reviews from jsuarezruiz and mattleibow via 08dffa0 February 20, 2024 21:07
@jsuarezruiz jsuarezruiz self-requested a review February 22, 2024 14:47
@rmarinho rmarinho merged commit 373b060 into main Feb 22, 2024
@rmarinho rmarinho deleted the foda/RotationTransform branch February 22, 2024 14:48
rmarinho pushed a commit that referenced this pull request Feb 27, 2024
* Fix transforms being offset by 0.5x0.5

* Added visual regression test

* Adjust tests

* Fix ref image

* update baseline img again...

---------

Co-authored-by: Mike Corsaro <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.10 fixed-in-9.0.0-preview.2.10247 fixed-in-9.0.0-preview.2.10293 partner Issue or Request from a partner team platform/windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WinUI - Circle view not rotating from center
5 participants