gg icon indicating copy to clipboard operation
gg copied to clipboard

How to use RotateAbout(rad, x, y) only for a specific object?

Open tagaism opened this issue 5 years ago • 1 comments

Hello everyone! I have a very basic question. When I use RotateAbout(rad, x, y) to one object all objects start to rotate around x, y point. How to use RotateAbout only for a specific object? I believe I must use Push() and Pop() function to preserve and to retrieve the context state. But it doesn't seem to be worked and I can't figure out how to do that.

tagaism avatar Jul 09 '20 13:07 tagaism

(Edit: sorry! I didn't know about Identity.)

You can use Identity to reset all transformations (including rotation).

If you don't want to reset anything other than the rotation, just rotate it the other way after drawing the object. ;)

HeCorr avatar Sep 02 '21 05:09 HeCorr