Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00038 #ifndef __vtkTextActor_h
00039 #define __vtkTextActor_h
00040 
00041 #include "vtkActor2D.h"
00042 
00043 // We need to include vtkTextMapper here otherwise we have an ambiguous
00044 // case of vtkMapper2D or vtkTextMapper in SetMapper(vtkTextMapper *mapper);
00045 // - two members with identical prototypes!
00046 class vtkTextProperty;
00047 class vtkTextMapper;
00048 
00049 class VTK_RENDERING_EXPORT vtkTextActor : public vtkActor2D
00050 {
00051 public:
00052   vtkTypeRevisionMacro(vtkTextActor,vtkActor2D);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00057   static vtkTextActor *New();
00058 
00061   void ShallowCopy(vtkProp *prop);
00062 
00065   void SetMapper(vtkTextMapper *mapper);
00066 
00068 
00071   void SetInput(const char *inputString);
00072   char *GetInput();
00074 
00076 
00078   vtkSetVector2Macro(MinimumSize,int);
00079   vtkGetVector2Macro(MinimumSize,int);
00081 
00083 
00086   vtkSetMacro(MaximumLineHeight,float);
00087   vtkGetMacro(MaximumLineHeight,float);
00089 
00091 
00094   vtkSetMacro(ScaledText,int);
00095   vtkGetMacro(ScaledText,int);
00096   vtkBooleanMacro(ScaledText,int);
00098 
00100 
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   
00132   virtual void SetNonLinearFontScale(double exponent, int target);
00133 
00134 //BTX
00139   virtual void ReleaseGraphicsResources(vtkWindow *);
00140 
00142 
00145   int RenderOpaqueGeometry(vtkViewport* viewport);
00146   int RenderTranslucentGeometry(vtkViewport* ) {return 0;};
00147   int RenderOverlay(vtkViewport* viewport);
00149 //ETX
00150 
00151 protected:
00154   void SetMapper(vtkMapper2D *mapper);
00155 
00156    vtkTextActor();
00157   ~vtkTextActor();
00158 
00159   int   MinimumSize[2];
00160   float MaximumLineHeight;
00161   double FontScaleExponent;
00162   double FontScaleTarget;
00163   int   ScaledText;
00164   int   AlignmentPoint;
00165 
00166   vtkCoordinate *AdjustedPositionCoordinate;
00167   vtkTextProperty *TextProperty;
00168 
00169   vtkTimeStamp  BuildTime;
00170   int LastSize[2];
00171   int LastOrigin[2];
00172 
00173 private:
00174   vtkTextActor(const vtkTextActor&);  // Not implemented.
00175   void operator=(const vtkTextActor&);  // Not implemented.
00176 };
00177 
00178 
00179 #endif
00180 

Generated on Mon Jan 21 23:07:36 2008 for VTK by  doxygen 1.4.3-20050530