[vtk-developers] vtkCaptionActor2D is not scaling the text to fit the rectangle when font size is default or 12
E. Tadeu
e.tadeu at gmail.com
Wed Apr 8 15:37:45 EDT 2015
To test it, just create a vtkCaptionActor2D and add it to a renderer.
See example here, tested in VTK 6.2:
```
import vtk
ren = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
actor = vtk.vtkCaptionActor2D()
actor.SetCaption(u'Hello')
# # This makes it work:
# actor.GetCaptionTextProperty().SetFontSize(13)
# # This also makes it work:
# actor.GetCaptionTextProperty().Modified()
# # This doesn't make it work:
# actor.GetCaptionTextProperty().SetFontSize(12)
ren.AddActor(actor)
iren.Initialize()
iren.Start()
```
I'm having another similar problem related to the font not being scaled
the second time it is rendered (after changing the scale), and I think it
may be related to this too.
Any hint on what may be causing this?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150408/4f2c23dc/attachment.html>
More information about the vtk-developers
mailing list