[vtk-developers] vtkTextActor rotation

David Lonie david.lonie at kitware.com
Wed Oct 8 15:52:13 EDT 2014

Hi Folks,

We've noticed some odd behavior while rotating 2D vtkTextActors. There are
two ways to do it:

vtkTextActor::SetOrientation(degrees), or

These behave very differently, especially when alignment flags are used --
see the attached image for an example. The bottom two rows show this most

Rotating the text property will rotate the text as it is being rendered
into the texture's buffer. This gives great antialiasing on the rotated
text, but gives bad alignment results, since the vtkTextActor is currently
aligning the entire texture to its position, rather than the text inside
the texture.

Rotating the actor gives the expected alignment behavior, but bad
antialiasing. This is because the text is rendered into the texture without
rotation, and then rotated afterwards.

Combining the two (top row) gives the worst of both cases.

I'd like to fix the text actor to align things "correctly" when the text
property is rotated. So my questions:

1) Is this behavior expected due to backwards compatibility?
2) If not, is this a good time to fix this? (e.g. are there any upcoming
releases I should hold off for?)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20141008/bad741f6/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: textactor-rotation.png
Type: image/png
Size: 79114 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20141008/bad741f6/attachment-0002.png>

More information about the vtk-developers mailing list