I tried it and it worked, however if I changed the text it would have moved on the X axis. It never stood still.
The problem is that my text needs to change length (Sometimes I want it to show a short word, sometimes a long word) and because of this the length of the text transform was changing as well and so the text was never centered.
xavimat wrote: ↑Sun Oct 14, 2018 6:44 am
There are style-properties, used in screens, and transform-properties, used in ATL.
"rotate" is not a style-property, is a transform-property. This can be confusing because "xpos" or "yalign", for example, are used in styles and in transforms, so one could assume that every property can be used in both, and that's not true.
In your case, you can create a transform and apply it to the text on the screen with "at".
Code: Select all
transform myrotate:
rotate 15
screen myscreen():
text "Hello world!" at myrotate
Note that "rotate" is tricky, many times the rotated element falls outside the screen. You may need to set also rotate_pad, and other rotate-related properties in the transform.
I didn't get to try your solution, since I was able to find something else, but thank you. If I need to place text at a 45 or 30 degree angle I'll give it a shot.
In the end I didn't need a custom angle for my text, I just needed it to be vertical, but because the vertical argument didn't rotate the letters I thought that the only way to create vertical text was by rotating it.
So for future reference, if anyone needs this:
Code: Select all
$ var_array = "{horiz=True}" + array_for_text[array_id] + "{/horiz}"
text var_array:
xpos 0.5
xanchor 0.5
vertical True
The vertical style propriety can be added to text to render it vertically, and then you can add the text tag horiz to rotate the letters.
In my case however the text that I needed to be rotated was in an array, so I had to create an additional variable that added the horiz text tag and my array together.
And now it works ^_^