Page 1 of 1
Quick way to rotate text
Posted: Wed Mar 04, 2009 2:29 pm
by andyh1234
Hi (again!)
Is there a quick way to rotate text.
Im using import snapshot at the moment to convert the field to a graphic then rotating that and hiding the original field, its pretty clumsy and slow.
Is there an easier way to simply rotate a text field?
Andy
Posted: Wed Mar 04, 2009 2:59 pm
by Klaus
Hi Andy,
using a rotated snapshot is the only way unfortunately!
But that is not really slow here on my MacMini 1.66 Ghz!?
Could you post your script?
Best
Klaus
Posted: Wed Mar 04, 2009 3:53 pm
by andyh1234
Sure, the code im using at the moment is
Code: Select all
if there is a image "hchartlabel" then delete image "hchartlabel"
import snapshot from fld "labelHeight"
set the name of the last image to "hchartlabel"
rotate image "hchartlabel" by 90
set the loc of image "hchartlabel" to 30,260
Seems to be fine on the mac, but takes about a second to pop up in Windows XP SP2. If its the best way its fine, just wanted to check if there was a faster way.
Do you know of any code that lets you add an item to a group?
The new snapshot is being created on the main card, Id prefer it in the group so it disappears with the rest of the group when I set the groups visible to false.
Again, its not a huge deal as I can just put a second line in where I turn the groups visible on and off to set the images visible to the same, but it would be perfect if I could just get it to add to the existing group.
Andy
Posted: Wed Mar 04, 2009 6:35 pm
by Klaus
Hi Andy,
add a "lock screen" and "unlock screen", maybe that will speed up things a bit.
Code: Select all
...
lock screen
import snapshot from fld "labelHeight"
set the name of the last image to "hchartlabel"
rotate image "hchartlabel" by 90
set the loc of image "hchartlabel" to 30,260
unlock screen
...
At least worth a try

Posted: Wed Mar 04, 2009 8:04 pm
by andyh1234
That did the trick - thanks!
rotating image of text
Posted: Wed Mar 04, 2009 9:21 pm
by mroam
PS: If you want to rotate images at angles other than multiples of 90 degrees AND still keep the ability to rotate them back again without distortion, you may use the "set the angle" command to change its property:
Code: Select all
set the angle of image "textpic" to 45
(quoting from documentation: "To rotate an image in a reversible way, or to do repeated rotations without progressive distortion of the image, set its angle property instead of using the rotate command. Unlike the rotate command, the angle property affects only the screen display of the image, not the actual picture data in it, so setting it repeatedly does not introduce distortion.")