Page 1 of 1
Rotation issue
Posted: Fri Nov 11, 2011 11:04 am
by Happyrever
Does anyone have a code snippet that maintains the 90 degree corners of a rectangle (image) when rotated by a known angle.
For example, an image rotated by 45degrees becomes diamond shaped with no corners at 90degrees.
Thank you in anticipation.
Re: Rotation issue
Posted: Fri Nov 11, 2011 11:42 am
by Klaus
Hi Happyrever,
sorry, I have no idea what you are talking about
When I "set the angle of img X to 45", I get an image that is rotated by 45 degrees, nothing more and nothing less!?
Could you post a screenshot to visualize your problem?
Best
Klaus
Re: Rotation issue
Posted: Fri Nov 11, 2011 1:10 pm
by Happyrever
The distortion I experienced is documented in the dictionary, however I see the correct way is to set the angle property rather than rotate.
It now introduces the issue of how to fit the overall taller and wider shape within the original rectangle size. Do you have an answer for that?
I have used your handy routine to maintain the rectangle proportions when an image is put into a given rectangular space, but of course, it was not intended for a partially rotated image.
Re: Rotation issue
Posted: Fri Nov 11, 2011 1:16 pm
by Happyrever
Sorry, problem solved by using the LockLocation to true so the rotated image fits the original rectangle.
Thanks for your time, it did promote thought.
Re: Rotation issue
Posted: Fri Nov 11, 2011 1:22 pm
by Klaus
Hi Happyrever,
ah, I see, sorry for my misunderstanding.
Yep, the "rotate" command is more an "image editing" feature, and setting the angle is for "display" purposes.
But since they completely "revamped" the graphics engine, "angled" images could definitively look better in my opinion!
Best
Klaus