FreeMat

- Main Page
- Related Pages

vtkTextProperty

Section: Visualization Toolkit Rendering Classes

# Usage

vtkTextProperty is an object that represents text properties. The primary properties that can be set are color, opacity, font size, font family horizontal and vertical justification, bold/italic/shadow styles.

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

      obj = vtkTextProperty

# Methods

The class vtkTextProperty 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 vtkTextProperty class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkTextProperty = obj.NewInstance ()`
- `vtkTextProperty = obj.SafeDownCast (vtkObject o)`
- `obj.SetColor (double , double , double )` - Set the color of the text.
- `obj.SetColor (double a[3])` - Set the color of the text.
- `double = obj. GetColor ()` - Set the color of the text.
- `obj.SetOpacity (double )` - Set/Get the text's opacity. 1.0 is totally opaque and 0.0 is completely transparent.
- `double = obj.GetOpacity ()` - Set/Get the text's opacity. 1.0 is totally opaque and 0.0 is completely transparent.
- `string = obj.GetFontFamilyAsString ()` - Set/Get the font family. Supports legacy three font family system.
- `obj.SetFontFamilyAsString (string )` - Set/Get the font family. Supports legacy three font family system.
- `obj.SetFontFamily (int t)` - Set/Get the font family. Supports legacy three font family system.
- `int = obj.GetFontFamily ()` - Set/Get the font family. Supports legacy three font family system.
- `int = obj.GetFontFamilyMinValue ()` - Set/Get the font family. Supports legacy three font family system.
- `obj.SetFontFamilyToArial ()` - Set/Get the font family. Supports legacy three font family system.
- `obj.SetFontFamilyToCourier ()` - Set/Get the font family. Supports legacy three font family system.
- `obj.SetFontFamilyToTimes ()` - Set/Get the font family. Supports legacy three font family system.
- `obj.SetFontSize (int )` - Set/Get the font size (in points).
- `int = obj.GetFontSizeMinValue ()` - Set/Get the font size (in points).
- `int = obj.GetFontSizeMaxValue ()` - Set/Get the font size (in points).
- `int = obj.GetFontSize ()` - Set/Get the font size (in points).
- `obj.SetBold (int )` - Enable/disable text bolding.
- `int = obj.GetBold ()` - Enable/disable text bolding.
- `obj.BoldOn ()` - Enable/disable text bolding.
- `obj.BoldOff ()` - Enable/disable text bolding.
- `obj.SetItalic (int )` - Enable/disable text italic.
- `int = obj.GetItalic ()` - Enable/disable text italic.
- `obj.ItalicOn ()` - Enable/disable text italic.
- `obj.ItalicOff ()` - Enable/disable text italic.
- `obj.SetShadow (int )` - Enable/disable text shadow.
- `int = obj.GetShadow ()` - Enable/disable text shadow.
- `obj.ShadowOn ()` - Enable/disable text shadow.
- `obj.ShadowOff ()` - Enable/disable text shadow.
- `obj.SetShadowOffset (int , int )` - Set/Get the shadow offset, i.e. the distance from the text to its shadow, in the same unit as FontSize.
- `obj.SetShadowOffset (int a[2])` - Set/Get the shadow offset, i.e. the distance from the text to its shadow, in the same unit as FontSize.
- `int = obj. GetShadowOffset ()` - Set/Get the shadow offset, i.e. the distance from the text to its shadow, in the same unit as FontSize.
- `obj.GetShadowColor (double color[3])` - Get the shadow color. It is computed from the Color ivar
- `obj.SetJustification (int )` - Set/Get the horizontal justification to left (default), centered, or right.
- `int = obj.GetJustificationMinValue ()` - Set/Get the horizontal justification to left (default), centered, or right.
- `int = obj.GetJustificationMaxValue ()` - Set/Get the horizontal justification to left (default), centered, or right.
- `int = obj.GetJustification ()` - Set/Get the horizontal justification to left (default), centered, or right.
- `obj.SetJustificationToLeft ()` - Set/Get the horizontal justification to left (default), centered, or right.
- `obj.SetJustificationToCentered ()` - Set/Get the horizontal justification to left (default), centered, or right.
- `obj.SetJustificationToRight ()` - Set/Get the horizontal justification to left (default), centered, or right.
- `string = obj.GetJustificationAsString ()` - Set/Get the horizontal justification to left (default), centered, or right.
- `obj.SetVerticalJustification (int )` - Set/Get the vertical justification to bottom (default), middle, or top.
- `int = obj.GetVerticalJustificationMinValue ()` - Set/Get the vertical justification to bottom (default), middle, or top.
- `int = obj.GetVerticalJustificationMaxValue ()` - Set/Get the vertical justification to bottom (default), middle, or top.
- `int = obj.GetVerticalJustification ()` - Set/Get the vertical justification to bottom (default), middle, or top.
- `obj.SetVerticalJustificationToBottom ()` - Set/Get the vertical justification to bottom (default), middle, or top.
- `obj.SetVerticalJustificationToCentered ()` - Set/Get the vertical justification to bottom (default), middle, or top.
- `obj.SetVerticalJustificationToTop ()` - Set/Get the vertical justification to bottom (default), middle, or top.
- `string = obj.GetVerticalJustificationAsString ()` - Set/Get the vertical justification to bottom (default), middle, or top.
- `obj.SetOrientation (double )` - Set/Get the text's orientation (in degrees).
- `double = obj.GetOrientation ()` - Set/Get the text's orientation (in degrees).
- `obj.SetLineSpacing (double )` - Set/Get the (extra) spacing between lines, expressed as a text height multiplication factor.
- `double = obj.GetLineSpacing ()` - Set/Get the (extra) spacing between lines, expressed as a text height multiplication factor.
- `obj.SetLineOffset (double )` - Set/Get the vertical offset (measured in pixels).
- `double = obj.GetLineOffset ()` - Set/Get the vertical offset (measured in pixels).
- `obj.ShallowCopy (vtkTextProperty tprop)` - Shallow copy of a text property.