VTK
|
An actor that displays text. Scaled or unscaled. More...
#include <vtkTextActor.h>
Public Types | |
enum | { TEXT_SCALE_MODE_NONE = 0, TEXT_SCALE_MODE_PROP, TEXT_SCALE_MODE_VIEWPORT } |
typedef vtkActor2D | Superclass |
![]() | |
typedef vtkProp | Superclass |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | ShallowCopy (vtkProp *prop) |
void | SetMapper (vtkPolyDataMapper2D *mapper) |
virtual void | SetNonLinearFontScale (double exponent, int target) |
void | SpecifiedToDisplay (double *pos, vtkViewport *vport, int specified) |
void | DisplayToSpecified (double *pos, vtkViewport *vport, int specified) |
virtual void | ComputeScaledFont (vtkViewport *viewport) |
virtual void | ReleaseGraphicsResources (vtkWindow *) |
void | SetInput (const char *inputString) |
char * | GetInput () |
virtual void | SetMinimumSize (int, int) |
void | SetMinimumSize (int[2]) |
virtual int * | GetMinimumSize () |
virtual void | GetMinimumSize (int &, int &) |
virtual void | GetMinimumSize (int[2]) |
virtual void | SetMaximumLineHeight (float) |
virtual float | GetMaximumLineHeight () |
virtual void | SetTextScaleMode (int) |
virtual int | GetTextScaleMode () |
void | SetTextScaleModeToNone () |
void | SetTextScaleModeToProp () |
void | SetTextScaleModeToViewport () |
void | SetScaledText (int) |
int | GetScaledText () |
void | ScaledTextOn () |
void | ScaledTextOff () |
virtual void | SetUseBorderAlign (int) |
virtual int | GetUseBorderAlign () |
virtual void | UseBorderAlignOn () |
virtual void | UseBorderAlignOff () |
void | SetAlignmentPoint (int point) |
int | GetAlignmentPoint () |
void | SetOrientation (float orientation) |
virtual float | GetOrientation () |
virtual void | SetTextProperty (vtkTextProperty *p) |
virtual vtkTextProperty * | GetTextProperty () |
virtual vtkTextProperty * | GetScaledTextProperty () |
virtual int | RenderOpaqueGeometry (vtkViewport *viewport) |
virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *) |
virtual int | RenderOverlay (vtkViewport *viewport) |
virtual int | HasTranslucentPolygonalGeometry () |
![]() | |
vtkProperty2D * | GetProperty () |
virtual void | SetProperty (vtkProperty2D *) |
void | SetDisplayPosition (int, int) |
virtual unsigned long | GetMTime () |
virtual void | GetActors2D (vtkPropCollection *pc) |
virtual vtkMapper2D * | GetMapper () |
virtual void | SetLayerNumber (int) |
virtual int | GetLayerNumber () |
virtual vtkCoordinate * | GetPositionCoordinate () |
virtual void | SetPosition (float x[2]) |
virtual void | SetPosition (float x, float y) |
virtual float * | GetPosition () |
virtual vtkCoordinate * | GetPosition2Coordinate () |
virtual void | SetPosition2 (float x[2]) |
virtual void | SetPosition2 (float x, float y) |
virtual float * | GetPosition2 () |
void | SetWidth (double w) |
double | GetWidth () |
void | SetHeight (double h) |
double | GetHeight () |
virtual vtkCoordinate * | GetActualPositionCoordinate (void) |
virtual vtkCoordinate * | GetActualPosition2Coordinate (void) |
![]() | |
virtual void | Pick () |
virtual unsigned long | GetRedrawMTime () |
virtual double * | GetBounds () |
virtual bool | HasKeys (vtkInformation *requiredKeys) |
virtual void | BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path) |
virtual void | GetActors (vtkPropCollection *) |
virtual void | GetVolumes (vtkPropCollection *) |
virtual void | SetVisibility (int) |
virtual int | GetVisibility () |
virtual void | VisibilityOn () |
virtual void | VisibilityOff () |
virtual void | SetPickable (int) |
virtual int | GetPickable () |
virtual void | PickableOn () |
virtual void | PickableOff () |
virtual void | SetDragable (int) |
virtual int | GetDragable () |
virtual void | DragableOn () |
virtual void | DragableOff () |
virtual void | SetUseBounds (bool) |
virtual bool | GetUseBounds () |
virtual void | UseBoundsOn () |
virtual void | UseBoundsOff () |
virtual void | InitPathTraversal () |
virtual vtkAssemblyPath * | GetNextPath () |
virtual int | GetNumberOfPaths () |
virtual void | PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix)) |
virtual vtkMatrix4x4 * | GetMatrix () |
virtual vtkInformation * | GetPropertyKeys () |
virtual void | SetPropertyKeys (vtkInformation *keys) |
virtual int | RenderVolumetricGeometry (vtkViewport *) |
virtual bool | RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
virtual bool | RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
virtual bool | RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
virtual bool | RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys) |
virtual double | GetEstimatedRenderTime (vtkViewport *) |
virtual double | GetEstimatedRenderTime () |
virtual void | SetEstimatedRenderTime (double t) |
virtual void | RestoreEstimatedRenderTime () |
virtual void | AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp)) |
virtual void | SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v)) |
virtual double | GetAllocatedRenderTime () |
void | SetRenderTimeMultiplier (double t) |
virtual double | GetRenderTimeMultiplier () |
virtual bool | GetSupportsSelection () |
virtual int | GetNumberOfConsumers () |
void | AddConsumer (vtkObject *c) |
void | RemoveConsumer (vtkObject *c) |
vtkObject * | GetConsumer (int i) |
int | IsConsumer (vtkObject *c) |
![]() | |
virtual void | DebugOn () |
virtual void | DebugOff () |
unsigned char | GetDebug () |
void | SetDebug (unsigned char debugFlag) |
virtual void | Modified () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
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 *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &os) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkTextActor * | SafeDownCast (vtkObject *o) |
static vtkTextActor * | New () |
static float | GetFontScale (vtkViewport *viewport) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkActor2D * | SafeDownCast (vtkObject *o) |
static vtkActor2D * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkProp * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObject *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
void | SetMapper (vtkMapper2D *mapper) |
vtkTextActor () | |
~vtkTextActor () | |
virtual void | ComputeRectangle (vtkViewport *viewport) |
virtual void | SetTexture (vtkTexture *) |
virtual vtkTexture * | GetTexture () |
![]() | |
vtkActor2D () | |
~vtkActor2D () | |
![]() | |
vtkProp () | |
~vtkProp () | |
![]() | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &os) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
An actor that displays text. Scaled or unscaled.
vtkTextActor can be used to place text annotation into a window. When TextScaleMode is NONE, the text is fixed font and operation is the same as a vtkPolyDataMapper2D/vtkActor2D pair. When TextScaleMode is VIEWPORT, the font resizes such that it maintains a consistent size relative to the viewport in which it is rendered. When TextScaleMode is PROP, the font resizes such that the text fits inside the box defined by the position 1 & 2 coordinates. This class replaces the deprecated vtkScaledTextActor and acts as a convenient wrapper for a vtkTextMapper/vtkActor2D pair. Set the text property/attributes through the vtkTextProperty associated to this actor.
Definition at line 54 of file vtkTextActor.h.
typedef vtkActor2D vtkTextActor::Superclass |
Definition at line 57 of file vtkTextActor.h.
anonymous enum |
Enumerator | |
---|---|
TEXT_SCALE_MODE_NONE | |
TEXT_SCALE_MODE_PROP | |
TEXT_SCALE_MODE_VIEWPORT |
Definition at line 115 of file vtkTextActor.h.
|
protected |
|
protected |
|
virtual |
Reimplemented from vtkActor2D.
Reimplemented in vtkScaledTextActor.
|
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 vtkActor2D.
Reimplemented in vtkScaledTextActor.
|
static |
|
virtual |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkActor2D.
|
static |
Instantiate object with a rectangle in normaled view coordinates of (0.2,0.85, 0.8, 0.95).
|
virtual |
Shallow copy of this text actor. Overloads the virtual vtkProp method.
Reimplemented from vtkActor2D.
void vtkTextActor::SetMapper | ( | vtkPolyDataMapper2D * | mapper | ) |
Override the vtkPolyDataMapper2D that defines the text to be drawn. One will be created by default if none is supplied
void vtkTextActor::SetInput | ( | const char * | inputString | ) |
Set the text string to be displayed. "\n" is recognized as a carriage return/linefeed (line separator). The characters must be in the ISO-8859-1 encoding. Convenience method to the underlying mapper
char* vtkTextActor::GetInput | ( | ) |
Set the text string to be displayed. "\n" is recognized as a carriage return/linefeed (line separator). The characters must be in the ISO-8859-1 encoding. Convenience method to the underlying mapper
|
virtual |
Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Only valid when TextScaleMode is PROP.
void vtkTextActor::SetMinimumSize | ( | int | [2] | ) |
Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Only valid when TextScaleMode is PROP.
|
virtual |
Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Only valid when TextScaleMode is PROP.
|
virtual |
Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Only valid when TextScaleMode is PROP.
|
virtual |
Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Only valid when TextScaleMode is PROP.
|
virtual |
Set/Get the maximum height of a line of text as a percentage of the vertical area allocated to this scaled text actor. Defaults to 1.0. Only valid when TextScaleMode is PROP.
|
virtual |
Set/Get the maximum height of a line of text as a percentage of the vertical area allocated to this scaled text actor. Defaults to 1.0. Only valid when TextScaleMode is PROP.
|
virtual |
Set how text should be scaled. If set to vtkTextActor::TEXT_SCALE_MODE_NONE, the the font size will be fixed by the size given in TextProperty. If set to vtkTextActor::TEXT_SCALE_MODE_PROP, the text will be scaled to fit exactly in the prop as specified by the position 1 & 2 coordinates. If set to vtkTextActor::TEXT_SCALE_MODE_VIEWPORT, the text will be scaled based on the size of the viewport it is displayed in.
|
virtual |
Set how text should be scaled. If set to vtkTextActor::TEXT_SCALE_MODE_NONE, the the font size will be fixed by the size given in TextProperty. If set to vtkTextActor::TEXT_SCALE_MODE_PROP, the text will be scaled to fit exactly in the prop as specified by the position 1 & 2 coordinates. If set to vtkTextActor::TEXT_SCALE_MODE_VIEWPORT, the text will be scaled based on the size of the viewport it is displayed in.
|
inline |
Set how text should be scaled. If set to vtkTextActor::TEXT_SCALE_MODE_NONE, the the font size will be fixed by the size given in TextProperty. If set to vtkTextActor::TEXT_SCALE_MODE_PROP, the text will be scaled to fit exactly in the prop as specified by the position 1 & 2 coordinates. If set to vtkTextActor::TEXT_SCALE_MODE_VIEWPORT, the text will be scaled based on the size of the viewport it is displayed in.
Definition at line 106 of file vtkTextActor.h.
|
inline |
Set how text should be scaled. If set to vtkTextActor::TEXT_SCALE_MODE_NONE, the the font size will be fixed by the size given in TextProperty. If set to vtkTextActor::TEXT_SCALE_MODE_PROP, the text will be scaled to fit exactly in the prop as specified by the position 1 & 2 coordinates. If set to vtkTextActor::TEXT_SCALE_MODE_VIEWPORT, the text will be scaled based on the size of the viewport it is displayed in.
Definition at line 108 of file vtkTextActor.h.
|
inline |
Set how text should be scaled. If set to vtkTextActor::TEXT_SCALE_MODE_NONE, the the font size will be fixed by the size given in TextProperty. If set to vtkTextActor::TEXT_SCALE_MODE_PROP, the text will be scaled to fit exactly in the prop as specified by the position 1 & 2 coordinates. If set to vtkTextActor::TEXT_SCALE_MODE_VIEWPORT, the text will be scaled based on the size of the viewport it is displayed in.
Definition at line 110 of file vtkTextActor.h.
void vtkTextActor::SetScaledText | ( | int | ) |
DO NOT CALL. Deprecated in VTK 5.4. Use SetTextScaleMode or GetTextScaleMode instead.
int vtkTextActor::GetScaledText | ( | ) |
DO NOT CALL. Deprecated in VTK 5.4. Use SetTextScaleMode or GetTextScaleMode instead.
void vtkTextActor::ScaledTextOn | ( | ) |
DO NOT CALL. Deprecated in VTK 5.4. Use SetTextScaleMode or GetTextScaleMode instead.
void vtkTextActor::ScaledTextOff | ( | ) |
DO NOT CALL. Deprecated in VTK 5.4. Use SetTextScaleMode or GetTextScaleMode instead.
|
virtual |
Turn on or off the UseBorderAlign option. When UseBorderAlign is on, the bounding rectangle is used to align the text, which is the proper behavior when using vtkTextRepresentation
|
virtual |
Turn on or off the UseBorderAlign option. When UseBorderAlign is on, the bounding rectangle is used to align the text, which is the proper behavior when using vtkTextRepresentation
|
virtual |
Turn on or off the UseBorderAlign option. When UseBorderAlign is on, the bounding rectangle is used to align the text, which is the proper behavior when using vtkTextRepresentation
|
virtual |
Turn on or off the UseBorderAlign option. When UseBorderAlign is on, the bounding rectangle is used to align the text, which is the proper behavior when using vtkTextRepresentation
void vtkTextActor::SetAlignmentPoint | ( | int | point | ) |
This method is being depricated. Use SetJustification and SetVerticalJustification in text property instead. Set/Get the Alignment point if zero (default), the text aligns itself to the bottom left corner (which is defined by the PositionCoordinate) otherwise the text aligns itself to corner/midpoint or centre
6 7 8 3 4 5 0 1 2
This is the same as setting the TextProperty's justification. Currently TextActor is not oriented around its AlignmentPoint.
int vtkTextActor::GetAlignmentPoint | ( | ) |
This method is being depricated. Use SetJustification and SetVerticalJustification in text property instead. Set/Get the Alignment point if zero (default), the text aligns itself to the bottom left corner (which is defined by the PositionCoordinate) otherwise the text aligns itself to corner/midpoint or centre
6 7 8 3 4 5 0 1 2
This is the same as setting the TextProperty's justification. Currently TextActor is not oriented around its AlignmentPoint.
void vtkTextActor::SetOrientation | ( | float | orientation | ) |
Counterclockwise rotation around the Alignment point. Units are in degrees and defaults to 0. The orientation in the text property rotates the text in the texture map. It will proba ly not give you the effect you desire.
|
virtual |
Counterclockwise rotation around the Alignment point. Units are in degrees and defaults to 0. The orientation in the text property rotates the text in the texture map. It will proba ly not give you the effect you desire.
|
virtual |
Set/Get the text property.
|
virtual |
Set/Get the text property.
|
virtual |
Enable non-linear scaling of font sizes. This is useful in combination with scaled text. With small windows you want to use the entire scaled text area. With larger windows you want to reduce the font size some so that the entire area is not used. These values modify the computed font size as follows: newFontSize = pow(FontSize,exponent)*pow(target,1.0 - exponent) typically exponent should be around 0.7 and target should be around 10
void vtkTextActor::SpecifiedToDisplay | ( | double * | pos, |
vtkViewport * | vport, | ||
int | specified | ||
) |
This is just a simple coordinate conversion method used in the render process.
void vtkTextActor::DisplayToSpecified | ( | double * | pos, |
vtkViewport * | vport, | ||
int | specified | ||
) |
This is just a simple coordinate conversion method used in the render process.
|
virtual |
Compute the scale the font should be given the viewport. The result is placed in the ScaledTextProperty ivar.
|
virtual |
Get the scaled font. Use ComputeScaledFont to set the scale for a given viewport.
|
static |
Provide a font scaling based on a viewport. This is the scaling factor used when the TextScaleMode is set to VIEWPORT and has been made public for other components to use. This scaling assumes that the long dimension of the viewport is meant to be 6 inches (a typical width of text in a paper) and then resizes based on if that long dimension was 72 DPI.
|
virtual |
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.
Reimplemented from vtkActor2D.
|
virtual |
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Draw the text actor to the screen.
Reimplemented from vtkActor2D.
|
inlinevirtual |
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Draw the text actor to the screen.
Reimplemented from vtkActor2D.
Definition at line 215 of file vtkTextActor.h.
|
virtual |
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Draw the text actor to the screen.
Reimplemented from vtkActor2D.
|
virtual |
Does this prop have some translucent polygonal geometry?
Reimplemented from vtkActor2D.
|
protectedvirtual |
Hide access methods that use superclass vtkMapper2D and not vtkImageMapper
Reimplemented from vtkActor2D.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Definition at line 233 of file vtkTextActor.h.
|
protected |
Definition at line 234 of file vtkTextActor.h.
|
protected |
Definition at line 235 of file vtkTextActor.h.
|
protected |
Definition at line 236 of file vtkTextActor.h.
|
protected |
Definition at line 237 of file vtkTextActor.h.
|
protected |
Definition at line 238 of file vtkTextActor.h.
|
protected |
Definition at line 240 of file vtkTextActor.h.
|
protected |
Definition at line 241 of file vtkTextActor.h.
|
protected |
Definition at line 244 of file vtkTextActor.h.
|
protected |
Definition at line 245 of file vtkTextActor.h.
|
protected |
Definition at line 246 of file vtkTextActor.h.
|
protected |
Definition at line 247 of file vtkTextActor.h.
|
protected |
Definition at line 248 of file vtkTextActor.h.
|
protected |
Definition at line 249 of file vtkTextActor.h.
|
protected |
Definition at line 250 of file vtkTextActor.h.
|
protected |
Definition at line 251 of file vtkTextActor.h.
|
protected |
Definition at line 252 of file vtkTextActor.h.
|
protected |
Definition at line 254 of file vtkTextActor.h.
|
protected |
Definition at line 257 of file vtkTextActor.h.
|
protected |
Definition at line 258 of file vtkTextActor.h.
|
protected |
Definition at line 259 of file vtkTextActor.h.