Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Rendering/vtkTextActor.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTextActor.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00039 #ifndef __vtkTextActor_h 00040 #define __vtkTextActor_h 00041 00042 #include "vtkActor2D.h" 00043 00044 // We need to include vtkTextMapper here otherwise we have an ambiguous 00045 // case of vtkMapper2D or vtkTextMapper in SetMapper(vtkTextMapper *mapper); 00046 // - two members with identical prototypes! 00047 class vtkTextProperty; 00048 class vtkTextMapper; 00049 00050 class VTK_RENDERING_EXPORT vtkTextActor : public vtkActor2D 00051 { 00052 public: 00053 vtkTypeRevisionMacro(vtkTextActor,vtkActor2D); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00058 static vtkTextActor *New(); 00059 00062 void ShallowCopy(vtkProp *prop); 00063 00066 void SetMapper(vtkTextMapper *mapper); 00067 00069 00072 void SetInput(const char *inputString); 00073 char *GetInput(); 00075 00077 00079 vtkSetVector2Macro(MinimumSize,int); 00080 vtkGetVector2Macro(MinimumSize,int); 00082 00084 00087 vtkSetMacro(MaximumLineHeight,float); 00088 vtkGetMacro(MaximumLineHeight,float); 00090 00092 00095 vtkSetMacro(ScaledText,int); 00096 vtkGetMacro(ScaledText,int); 00097 vtkBooleanMacro(ScaledText,int); 00099 00101 00107 vtkSetClampMacro(AlignmentPoint,int,0,8) 00108 vtkGetMacro(AlignmentPoint,int); 00110 00112 00115 vtkCoordinate *GetActualPositionCoordinate(void) 00116 { return this->AdjustedPositionCoordinate; } 00118 00120 00121 virtual void SetTextProperty(vtkTextProperty *p); 00122 vtkGetObjectMacro(TextProperty,vtkTextProperty); 00124 00125 //BTX 00130 virtual void ReleaseGraphicsResources(vtkWindow *); 00131 00133 00136 int RenderOpaqueGeometry(vtkViewport* viewport); 00137 int RenderTranslucentGeometry(vtkViewport* ) {return 0;}; 00138 int RenderOverlay(vtkViewport* viewport); 00140 //ETX 00141 00142 protected: 00145 void SetMapper(vtkMapper2D *mapper); 00146 00147 vtkTextActor(); 00148 ~vtkTextActor(); 00149 00150 int MinimumSize[2]; 00151 float MaximumLineHeight; 00152 int ScaledText; 00153 int AlignmentPoint; 00154 00155 vtkCoordinate *AdjustedPositionCoordinate; 00156 vtkTextProperty *TextProperty; 00157 00158 vtkTimeStamp BuildTime; 00159 int LastSize[2]; 00160 int LastOrigin[2]; 00161 00162 private: 00163 vtkTextActor(const vtkTextActor&); // Not implemented. 00164 void operator=(const vtkTextActor&); // Not implemented. 00165 }; 00166 00167 00168 #endif 00169