-
Notifications
You must be signed in to change notification settings - Fork 419
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
graphics rotation interacts incorrectly with clipping #2567
Comments
…incorrect results. This fixes some issues with rotation and clipping on Android, in particular, #2567. The test case provided in that issue now works correctly in the simulator, iOS, and android. It still fails on Javascript - and haven't tested on UWP yet. Work on those is still in progress. Note: As part of this fix, I changed the behaviour of Graphics.rotate(angle, x, y) so that the x, y coordinates are relative to the context's current translateX and translateY values (i.e. translateX, and translateY will be added to these values before calling the internal transform's rotation. While this may possibly be a breaking change, this is the 'right' way for it to work and is consistent with all other methods in Graphics.
Thanks. I had noticed that I had to include +getAbsoluteX() in the center calculation, so will |
Please reopen this. The initial behavior is correct, but if you switch orientation |
@ddyer0 Note: I have reverted the behaviour of rotate() to use absolute coordinates to preserve backward compatibility. I have introduced a new This will be part of the next server update. Sorry for the inconvenience. |
combining clipping regions with graphics rotation doesn't work correctly. I believe
the simulator behavior is correct. IOS initially is also correct, but curiously, if you then
rotate the orientation, subsequent calls to paint produce incorrect results. Android
never works right.
This is a sample from the simulator

this is the same program, on android

this the same result on IOS, launching the test program in portrait mode

them rotating to horizontal mode.
The text was updated successfully, but these errors were encountered: