Problem with Annotate method + text rotation
Posted: 2011-11-28T23:55:00-07:00
I'd like to annotate an image with a text which can be rotated by 0,90, 180 or 270 degrees.
The angle is not known in advance. The font size also is not known in advance.
I use the gravity to choose the text position.
When the gravity is in the center, everything works well.
However when the gravity is in another position (corner for example) if I use the angle parameter of the annotate method to rotate the text, then the text disappears outside the image.
How can I make the text stay inside the image after the rotation ?
The angle is not known in advance. The font size also is not known in advance.
I use the gravity to choose the text position.
When the gravity is in the center, everything works well.
However when the gravity is in another position (corner for example) if I use the angle parameter of the annotate method to rotate the text, then the text disappears outside the image.
How can I make the text stay inside the image after the rotation ?