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

vtkTextActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTextActor.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00046 #ifndef __vtkTextActor_h
00047 #define __vtkTextActor_h
00048 
00049 #include "vtkActor2D.h"
00050 
00051 // We need to include vtkTextMapper here otherwise we have an ambiguous
00052 // case of vtkMapper2D or vtkTextMapper in SetMapper(vtkTextMapper *mapper);
00053 // - two members with identical prototypes!
00054 class vtkTextProperty;
00055 class vtkTextMapper;
00056 
00057 class VTK_RENDERING_EXPORT vtkTextActor : public vtkActor2D
00058 {
00059 public:
00060   vtkTypeRevisionMacro(vtkTextActor,vtkActor2D);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00065   static vtkTextActor *New();
00066 
00069   void ShallowCopy(vtkProp *prop);
00070 
00073   void SetMapper(vtkTextMapper *mapper);
00074 
00076 
00079   void SetInput(const char *inputString);
00080   char *GetInput();
00082 
00084 
00086   vtkSetVector2Macro(MinimumSize,int);
00087   vtkGetVector2Macro(MinimumSize,int);
00089 
00091 
00094   vtkSetMacro(MaximumLineHeight,float);
00095   vtkGetMacro(MaximumLineHeight,float);
00097 
00099 
00102   vtkSetMacro(ScaledText,int);
00103   vtkGetMacro(ScaledText,int);
00104   vtkBooleanMacro(ScaledText,int);
00106 
00108 
00114   vtkSetClampMacro(AlignmentPoint,int,0,8)
00115   vtkGetMacro(AlignmentPoint,int);
00117 
00119 
00122   vtkCoordinate *GetActualPositionCoordinate(void)
00123     { return this->AdjustedPositionCoordinate; }
00125 
00127 
00128   virtual void SetTextProperty(vtkTextProperty *p);
00129   vtkGetObjectMacro(TextProperty,vtkTextProperty);
00131   
00139   virtual void SetNonLinearFontScale(double exponent, int target);
00140 
00141 //BTX
00146   virtual void ReleaseGraphicsResources(vtkWindow *);
00147 
00149 
00152   int RenderOpaqueGeometry(vtkViewport* viewport);
00153   int RenderTranslucentGeometry(vtkViewport* ) {return 0;};
00154   int RenderOverlay(vtkViewport* viewport);
00156 //ETX
00157 
00158 protected:
00161   void SetMapper(vtkMapper2D *mapper);
00162 
00163    vtkTextActor();
00164   ~vtkTextActor();
00165 
00166   int   MinimumSize[2];
00167   float MaximumLineHeight;
00168   double FontScaleExponent;
00169   double FontScaleTarget;
00170   int   ScaledText;
00171   int   AlignmentPoint;
00172 
00173   vtkCoordinate *AdjustedPositionCoordinate;
00174   vtkTextProperty *TextProperty;
00175 
00176   vtkTimeStamp  BuildTime;
00177   int LastSize[2];
00178   int LastOrigin[2];
00179 
00180 private:
00181   vtkTextActor(const vtkTextActor&);  // Not implemented.
00182   void operator=(const vtkTextActor&);  // Not implemented.
00183 };
00184 
00185 
00186 #endif
00187