How can I discover the values of rotate/scale? For example, after I issue the following command:
90 rotate
the current rotation is set to 90. How do I discover what rotate is set to?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Rotation (also scaling and shearing) do not have individual values. All such transformations are rolled up into the Current Transformation Matrix (CTM).
You can find an excellent description of the CTM and the transformations in the PostScript Language Reference Manual, especially sections 4.3.1 to 4.3.3. Its an important area to understand for PostScript as the CTM underpins all drawing operations. Its really too complex to explain in this forum I think.
The short answer is that there is no simple solution, you have to do some matrix algebra to find out where points map to. A common trick is to pass the co-ordinates of the unit square through the CTM (points 0,0 and 1,1) and see where the transformed points end up.