40 #ifndef __vtkTextActor_h
41 #define __vtkTextActor_h
43 #include "vtkRenderingFreeTypeModule.h"
44 #include "vtkActor2D.h"
46 class vtkTextProperty;
47 class vtkPolyDataMapper2D;
49 class vtkTextRenderer;
59 void PrintSelf(ostream& os, vtkIndent indent);
67 void ShallowCopy(vtkProp *prop);
71 void SetMapper(vtkPolyDataMapper2D *mapper);
77 void SetInput(
const char *inputString);
84 vtkSetVector2Macro(MinimumSize,
int);
85 vtkGetVector2Macro(MinimumSize,
int);
92 vtkSetMacro(MaximumLineHeight,
float);
93 vtkGetMacro(MaximumLineHeight,
float);
104 vtkSetClampMacro(TextScaleMode,
int,
105 TEXT_SCALE_MODE_NONE, TEXT_SCALE_MODE_VIEWPORT);
106 vtkGetMacro(TextScaleMode,
int);
108 { this->SetTextScaleMode(TEXT_SCALE_MODE_NONE); }
110 { this->SetTextScaleMode(TEXT_SCALE_MODE_PROP); }
112 { this->SetTextScaleMode(TEXT_SCALE_MODE_VIEWPORT); }
117 TEXT_SCALE_MODE_NONE = 0,
119 TEXT_SCALE_MODE_VIEWPORT
127 vtkSetMacro(UseBorderAlign,
int);
128 vtkGetMacro(UseBorderAlign,
int);
129 vtkBooleanMacro(UseBorderAlign,
int);
141 void SetAlignmentPoint(
int point);
142 int GetAlignmentPoint();
150 void SetOrientation(
float orientation);
151 vtkGetMacro(Orientation,
float);
156 virtual void SetTextProperty(vtkTextProperty *p);
157 vtkGetObjectMacro(TextProperty,vtkTextProperty);
163 virtual void GetBoundingBox(vtkViewport* vport,
double bbox[4]);
167 virtual void GetSize(vtkViewport* vport,
double size[2]);
174 virtual int SetConstrainedFontSize(
175 vtkViewport*,
int targetWidth,
int targetHeight);
176 static int SetConstrainedFontSize(
177 vtkTextActor*, vtkViewport*,
int targetWidth,
int targetHeight);
185 static int SetMultipleConstrainedFontSize(
186 vtkViewport*,
int targetWidth,
int targetHeight,
187 vtkTextActor** actors,
int nbOfActors,
int* maxResultingSize);
197 virtual void SetNonLinearFontScale(
double exponent,
int target);
201 void SpecifiedToDisplay(
double *pos, vtkViewport *vport,
int specified);
205 void DisplayToSpecified(
double *pos, vtkViewport *vport,
int specified);
209 virtual void ComputeScaledFont(vtkViewport *viewport);
214 vtkGetObjectMacro(ScaledTextProperty, vtkTextProperty);
223 static float GetFontScale(vtkViewport *viewport);
230 virtual void ReleaseGraphicsResources(vtkWindow *);
236 virtual int RenderOpaqueGeometry(vtkViewport* viewport);
238 virtual int RenderOverlay(vtkViewport* viewport);
243 virtual int HasTranslucentPolygonalGeometry();
250 void SetMapper(vtkMapper2D *mapper);
253 virtual bool RenderImage(vtkTextProperty *tprop, vtkViewport *viewport);
257 virtual bool GetImageBoundingBox(
258 vtkTextProperty *tprop, vtkViewport *viewport,
int bbox[4]);
292 virtual void ComputeRectangle(vtkViewport *viewport);
301 virtual int UpdateRectangle(vtkViewport* viewport);
308 virtual void SetTexture(vtkTexture*);
309 vtkGetObjectMacro(Texture,vtkTexture);
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
void SetTextScaleModeToViewport()
vtkPoints * RectanglePoints
vtkTextProperty * ScaledTextProperty
An actor that displays text. Scaled or unscaled.
void SetTextScaleModeToProp()
vtkTextRenderer * TextRenderer
void SetTextScaleModeToNone()
vtkTextProperty * TextProperty
vtkPolyDataMapper2D * PDMapper