[vtk-developers] New scaling mode for vtkTextActor

David C Thompson dcthomp at sandia.gov
Wed May 14 19:47:40 EDT 2008


> I've been working on ParaView bug #6096
> (http://www.paraview.org/Bug/view.php?id=6096) and as part of the
> solution I would like to implement a new scaling mode to vtkTextActor.
> Right now, vtkTextActor can either used a fixed font or can scale the
> text to fit within the bounds of the prop.  I propose implementing a
> third mode that will scale the font based on the size of the viewport
> in which the prop is placed.

How are you measuring the "size of the viewport"? Pixels? Millimeters? I
think the problem you are having with the existing modes is that

1. The vtkWindow::DPI member is not being changed when a high-resolution
movie is being rendered

and

2. While they are supposed to be using the vtkTextProperty font size as
a number with units of "points", the various actor/mapper classes end up
assuming a fixed-resolution (75 dpi) output device. For instance, see
vtkFreeTypeUtilities::GetSize.

	David





More information about the vtk-developers mailing list