User (Legacy) Posted January 8, 2007 Report Share Posted January 8, 2007 Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 8, 2007 Author Report Share Posted January 8, 2007 Attachments.zip Attachments.zip Link to comment Share on other sites More sharing options...
Software FX Posted January 15, 2007 Report Share Posted January 15, 2007 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 More sharing options...
Software FX Posted January 15, 2007 Report Share Posted January 15, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.