Jump to content
Software FX Community

positioning of rotated text annotation


User (Legacy)

Recommended Posts

Hi Kurt, rotate uses the center of the annotation text to pivote. What you 

are trying to do can be easyli acchived using setOrientation, for example:

text2.setText("Some Text");

text2.setTop(100);

text2.setLeft(200);

text2.setOrientation(1);

text2.sizeToFit();

Regards,

GA

"DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

news:%23K0aKuwMHHA.3068@webserver3.softwarefx.com...

> Hi,

>

> I wonder how to set the coordinates of a rotated text annotation so that

> the text will end up at the desired coordinates.

> I'm facing the following situation: There's a chart: width: 300px,

> height 300px with an annotated text, which is positioned by using

> setLeft(100) and setTop(200) which leads to the expected output

> (attachment: Text_notRotated_marked.png - red dot indicates coordinates).

>

> When the annotation is rotated anti-clockwise by rotate(false) the text

> ends up to be "somewhere near" the set coordinates. Please find attached

> the resulting PNG file (Text_rotated_marked.png). The position (100/200)

> is marked by a red dot, just to show the difference.

>

> Is there a way to calculate the diversity between the positioned text

> and the set coordinates so that the offset can be programmatically

> corrected?

>

> Thank you for any help in advance,

>

> Kurt

>

Link to comment
Share on other sites

Hi Kurt, rotate uses the center of the annotation text to pivote. What you 

are trying to do can be easyli acchived using setOrientation, for example:

text2.setText("Some Text");

text2.setTop(100);

text2.setLeft(200);

text2.setOrientation(1);

text2.sizeToFit();

Regards,

GA

"DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

news:%23K0aKuwMHHA.3068@webserver3.softwarefx.com...

> Hi,

>

> I wonder how to set the coordinates of a rotated text annotation so that

> the text will end up at the desired coordinates.

> I'm facing the following situation: There's a chart: width: 300px,

> height 300px with an annotated text, which is positioned by using

> setLeft(100) and setTop(200) which leads to the expected output

> (attachment: Text_notRotated_marked.png - red dot indicates coordinates).

>

> When the annotation is rotated anti-clockwise by rotate(false) the text

> ends up to be "somewhere near" the set coordinates. Please find attached

> the resulting PNG file (Text_rotated_marked.png). The position (100/200)

> is marked by a red dot, just to show the difference.

>

> Is there a way to calculate the diversity between the positioned text

> and the set coordinates so that the offset can be programmatically

> corrected?

>

> Thank you for any help in advance,

>

> Kurt

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...