VTK
|
represent text properties. More...
#include <vtkTextProperty.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkTextProperty * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual void | SetColor (double, double, double) |
Set the color of the text. More... | |
virtual void | SetColor (double[3]) |
virtual double * | GetColor () |
virtual void | GetColor (double &, double &, double &) |
virtual void | GetColor (double[3]) |
virtual void | SetOpacity (double) |
Set/Get the text's opacity. More... | |
virtual double | GetOpacity () |
virtual void | SetBackgroundColor (double, double, double) |
The background color. More... | |
virtual void | SetBackgroundColor (double[3]) |
virtual double * | GetBackgroundColor () |
virtual void | GetBackgroundColor (double &, double &, double &) |
virtual void | GetBackgroundColor (double[3]) |
virtual void | SetBackgroundOpacity (double) |
The background opacity. More... | |
virtual double | GetBackgroundOpacity () |
virtual void | SetFrameColor (double, double, double) |
The frame color. More... | |
virtual void | SetFrameColor (double[3]) |
virtual double * | GetFrameColor () |
virtual void | GetFrameColor (double &, double &, double &) |
virtual void | GetFrameColor (double[3]) |
virtual void | SetFrame (vtkTypeBool) |
Enable/disable text frame. More... | |
virtual vtkTypeBool | GetFrame () |
virtual void | FrameOn () |
virtual void | FrameOff () |
virtual void | SetFrameWidth (int) |
Set/Get the width of the frame. More... | |
virtual int | GetFrameWidth () |
virtual char * | GetFontFamilyAsString () |
Set/Get the font family. More... | |
virtual void | SetFontFamilyAsString (const char *) |
void | SetFontFamily (int t) |
int | GetFontFamily () |
int | GetFontFamilyMinValue () |
void | SetFontFamilyToArial () |
void | SetFontFamilyToCourier () |
void | SetFontFamilyToTimes () |
virtual char * | GetFontFile () |
The absolute filepath to a local file containing a freetype-readable font if GetFontFamily() return VTK_FONT_FILE. More... | |
virtual void | SetFontFile (const char *) |
virtual void | SetFontSize (int) |
Set/Get the font size (in points). More... | |
virtual int | GetFontSize () |
virtual void | SetBold (vtkTypeBool) |
Enable/disable text bolding. More... | |
virtual vtkTypeBool | GetBold () |
virtual void | BoldOn () |
virtual void | BoldOff () |
virtual void | SetItalic (vtkTypeBool) |
Enable/disable text italic. More... | |
virtual vtkTypeBool | GetItalic () |
virtual void | ItalicOn () |
virtual void | ItalicOff () |
virtual void | SetShadow (vtkTypeBool) |
Enable/disable text shadow. More... | |
virtual vtkTypeBool | GetShadow () |
virtual void | ShadowOn () |
virtual void | ShadowOff () |
virtual void | SetShadowOffset (int, int) |
Set/Get the shadow offset, i.e. More... | |
void | SetShadowOffset (int[2]) |
virtual int * | GetShadowOffset () |
virtual void | GetShadowOffset (int data[2]) |
void | GetShadowColor (double color[3]) |
Get the shadow color. More... | |
virtual void | SetJustification (int) |
Set/Get the horizontal justification to left (default), centered, or right. More... | |
virtual int | GetJustification () |
void | SetJustificationToLeft () |
void | SetJustificationToCentered () |
void | SetJustificationToRight () |
const char * | GetJustificationAsString () |
virtual void | SetVerticalJustification (int) |
Set/Get the vertical justification to bottom (default), middle, or top. More... | |
virtual int | GetVerticalJustification () |
void | SetVerticalJustificationToBottom () |
void | SetVerticalJustificationToCentered () |
void | SetVerticalJustificationToTop () |
const char * | GetVerticalJustificationAsString () |
virtual void | SetUseTightBoundingBox (vtkTypeBool) |
If this property is on, text is aligned to drawn pixels not to font metrix. More... | |
virtual vtkTypeBool | GetUseTightBoundingBox () |
virtual void | UseTightBoundingBoxOn () |
virtual void | UseTightBoundingBoxOff () |
virtual void | SetOrientation (double) |
Set/Get the text's orientation (in degrees). More... | |
virtual double | GetOrientation () |
virtual void | SetLineSpacing (double) |
Set/Get the (extra) spacing between lines, expressed as a text height multiplication factor. More... | |
virtual double | GetLineSpacing () |
virtual void | SetLineOffset (double) |
Set/Get the vertical offset (measured in pixels). More... | |
virtual double | GetLineOffset () |
void | ShallowCopy (vtkTextProperty *tprop) |
Shallow copy of a text property. More... | |
![]() | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. More... | |
virtual void | DebugOff () |
Turn debugging output off. More... | |
bool | GetDebug () |
Get the value of the debug flag. More... | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. More... | |
virtual void | Modified () |
Update the modification time for this object. More... | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. More... | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
vtkTypeBool | HasObserver (unsigned long event) |
vtkTypeBool | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. More... | |
int | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
Return the class name as a string. More... | |
virtual void | Delete () |
Delete a VTK object. More... | |
virtual void | FastDelete () |
Delete a reference to this object. More... | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. More... | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
virtual void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). More... | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). More... | |
int | GetReferenceCount () |
Return the current reference count of this object. More... | |
void | SetReferenceCount (int) |
Sets the reference count. More... | |
void | PrintRevisions (ostream &) |
Legacy. More... | |
Static Public Member Functions | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkTextProperty * | SafeDownCast (vtkObjectBase *o) |
static vtkTextProperty * | New () |
Creates a new text property with font size 12, bold off, italic off, and Arial font. More... | |
static int | GetFontFamilyFromString (const char *f) |
static const char * | GetFontFamilyAsString (int f) |
![]() | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. More... | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. More... | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkTextProperty () | |
~vtkTextProperty () override | |
![]() | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. More... | |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
double | Color [3] |
double | Opacity |
double | BackgroundColor [3] |
double | BackgroundOpacity |
vtkTypeBool | Frame |
double | FrameColor [3] |
int | FrameWidth |
char * | FontFamilyAsString |
char * | FontFile |
int | FontSize |
vtkTypeBool | Bold |
vtkTypeBool | Italic |
vtkTypeBool | Shadow |
int | ShadowOffset [2] |
int | Justification |
int | VerticalJustification |
vtkTypeBool | UseTightBoundingBox |
double | Orientation |
double | LineOffset |
double | LineSpacing |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
represent text properties.
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.
Definition at line 39 of file vtkTextProperty.h.
typedef vtkObject vtkTextProperty::Superclass |
Definition at line 42 of file vtkTextProperty.h.
|
protected |
|
overrideprotected |
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class.
Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObjectBase.
|
static |
|
protectedvirtual |
vtkTextProperty* vtkTextProperty::NewInstance | ( | ) | const |
|
overridevirtual |
|
static |
Creates a new text property with font size 12, bold off, italic off, and Arial font.
Set the color of the text.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Set/Get the text's opacity.
1.0 is totally opaque and 0.0 is completely transparent.
|
virtual |
The background color.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
The background opacity.
1.0 is totally opaque and 0.0 is completely transparent.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Enable/disable text frame.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Set/Get the width of the frame.
The width is expressed in pixels. The default is 1 pixel.
|
virtual |
|
virtual |
Set/Get the font family.
Supports legacy three font family system. If the symbolic constant VTK_FONT_FILE is returned by GetFontFamily(), the string returned by GetFontFile() must be an absolute filepath to a local FreeType compatible font.
|
virtual |
|
inline |
Definition at line 314 of file vtkTextProperty.h.
|
inline |
Definition at line 355 of file vtkTextProperty.h.
|
inline |
Definition at line 122 of file vtkTextProperty.h.
|
inline |
Definition at line 319 of file vtkTextProperty.h.
|
inline |
Definition at line 324 of file vtkTextProperty.h.
|
inline |
Definition at line 329 of file vtkTextProperty.h.
|
inlinestatic |
Definition at line 334 of file vtkTextProperty.h.
|
inlinestatic |
Definition at line 293 of file vtkTextProperty.h.
|
virtual |
The absolute filepath to a local file containing a freetype-readable font if GetFontFamily() return VTK_FONT_FILE.
The result is undefined for other values of GetFontFamily().
|
virtual |
|
virtual |
Set/Get the font size (in points).
|
virtual |
|
virtual |
Enable/disable text bolding.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Enable/disable text italic.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Enable/disable text shadow.
|
virtual |
|
virtual |
|
virtual |
Set/Get the shadow offset, i.e.
the distance from the text to its shadow, in the same unit as FontSize.
void vtkTextProperty::SetShadowOffset | ( | int | [2] | ) |
|
virtual |
|
virtual |
void vtkTextProperty::GetShadowColor | ( | double | color[3] | ) |
Get the shadow color.
It is computed from the Color ivar
|
virtual |
Set/Get the horizontal justification to left (default), centered, or right.
|
virtual |
|
inline |
Definition at line 196 of file vtkTextProperty.h.
|
inline |
Definition at line 198 of file vtkTextProperty.h.
|
inline |
Definition at line 200 of file vtkTextProperty.h.
|
inline |
Definition at line 360 of file vtkTextProperty.h.
|
virtual |
Set/Get the vertical justification to bottom (default), middle, or top.
|
virtual |
|
inline |
Definition at line 212 of file vtkTextProperty.h.
|
inline |
Definition at line 214 of file vtkTextProperty.h.
|
inline |
Definition at line 216 of file vtkTextProperty.h.
|
inline |
Definition at line 377 of file vtkTextProperty.h.
|
virtual |
If this property is on, text is aligned to drawn pixels not to font metrix.
If the text does not include descents, the bounding box will not extend below the baseline. This option can be used to get centered labels. It does not work well if the string changes as the string position will move around.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Set/Get the text's orientation (in degrees).
|
virtual |
|
virtual |
Set/Get the (extra) spacing between lines, expressed as a text height multiplication factor.
|
virtual |
|
virtual |
Set/Get the vertical offset (measured in pixels).
|
virtual |
void vtkTextProperty::ShallowCopy | ( | vtkTextProperty * | tprop | ) |
Shallow copy of a text property.
|
protected |
Definition at line 267 of file vtkTextProperty.h.
|
protected |
Definition at line 268 of file vtkTextProperty.h.
|
protected |
Definition at line 269 of file vtkTextProperty.h.
|
protected |
Definition at line 270 of file vtkTextProperty.h.
|
protected |
Definition at line 271 of file vtkTextProperty.h.
|
protected |
Definition at line 272 of file vtkTextProperty.h.
|
protected |
Definition at line 273 of file vtkTextProperty.h.
|
protected |
Definition at line 274 of file vtkTextProperty.h.
|
protected |
Definition at line 275 of file vtkTextProperty.h.
|
protected |
Definition at line 276 of file vtkTextProperty.h.
|
protected |
Definition at line 277 of file vtkTextProperty.h.
|
protected |
Definition at line 278 of file vtkTextProperty.h.
|
protected |
Definition at line 279 of file vtkTextProperty.h.
|
protected |
Definition at line 280 of file vtkTextProperty.h.
|
protected |
Definition at line 281 of file vtkTextProperty.h.
|
protected |
Definition at line 282 of file vtkTextProperty.h.
|
protected |
Definition at line 283 of file vtkTextProperty.h.
|
protected |
Definition at line 284 of file vtkTextProperty.h.
|
protected |
Definition at line 285 of file vtkTextProperty.h.
|
protected |
Definition at line 286 of file vtkTextProperty.h.