FreeMat: vtkTextActor3D

FreeMat

- Main Page
- Related Pages

vtkTextActor3D

Section: Visualization Toolkit Rendering Classes

# Usage

The input text is rendered into a buffer, which in turn is used as a texture applied onto a quad (a vtkImageActor is used under the hood). .SECTION Warning This class is experimental at the moment.

- The orientation is not optimized, the quad should be oriented, not the text itself when it is rendered in the buffer (we end up with excessively big textures for 45 degrees angles). This will be fixed first.
- No checking is done at the moment regarding hardware texture size limits.
- Alignment is not supported (soon).
- Multiline is not supported.
- Need to fix angle out of 0<->360

To create an instance of class vtkTextActor3D, simply invoke its constructor as follows

      obj = vtkTextActor3D

# Methods

The class vtkTextActor3D has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkTextActor3D class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkTextActor3D = obj.NewInstance ()`
- `vtkTextActor3D = obj.SafeDownCast (vtkObject o)`
- `obj.SetInput (string )` - Set the text string to be displayed.
- `string = obj.GetInput ()` - Set the text string to be displayed.
- `obj.SetTextProperty (vtkTextProperty p)` - Set/Get the text property.
- `vtkTextProperty = obj.GetTextProperty ()` - Set/Get the text property.
- `obj.ShallowCopy (vtkProp prop)` - Shallow copy of this text actor. Overloads the virtual vtkProp method.
- `double = obj.GetBounds ()` - Get the bounds for this Prop3D as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). These are the padded-to-power-of-two texture bounds.
- `int = obj.GetBoundingBox (int bbox[4])` - Get the Freetype-derived real bounding box for the given vtkTextProperty and text string str. Results are returned in the four element bbox int array. This call can be used for sizing other elements.