Rendering/vtkTextActor.h Source File

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

# 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 =========================================================================*/
    00050 #ifndef __vtkTextActor_h
    00051 #define __vtkTextActor_h
    00052
    00053 #include "vtkActor2D.h"
    00054
    00055 // We need to include vtkTextMapper here otherwise we have an ambiguous
    00056 // case of vtkMapper2D or vtkTextMapper in SetMapper(vtkTextMapper *mapper);
    00057 // - two members with identical prototypes!
    00058 class vtkTextProperty;
    00059 class vtkTextMapper;
    00060
    00061 class VTK_RENDERING_EXPORT vtkTextActor : public vtkActor2D
    00062 {
    00063 public:
    00064   vtkTypeRevisionMacro(vtkTextActor,vtkActor2D);
    00065   void PrintSelf(ostream& os, vtkIndent indent);
    00066
    00069   static vtkTextActor *New();
    00070
    00073   void ShallowCopy(vtkProp *prop);
    00074
    00077   void SetMapper(vtkTextMapper *mapper);
    00078
    00080
    00083   void SetInput(const char *inputString);
    00084   char *GetInput();
    00086
    00088
    00090   vtkSetVector2Macro(MinimumSize,int);
    00091   vtkGetVector2Macro(MinimumSize,int);
    00093
    00095
    00098   vtkSetMacro(MaximumLineHeight,float);
    00099   vtkGetMacro(MaximumLineHeight,float);
    00101
    00103
    00106   vtkSetMacro(ScaledText,int);
    00107   vtkGetMacro(ScaledText,int);
    00108   vtkBooleanMacro(ScaledText,int);
    00110
    00112
    00118   vtkSetClampMacro(AlignmentPoint,int,0,8)
    00119   vtkGetMacro(AlignmentPoint,int);
    00121
    00123
    00126   vtkCoordinate *GetActualPositionCoordinate(void)
    00127     { return this->AdjustedPositionCoordinate; }
    00129
    00131
    00132   virtual void SetTextProperty(vtkTextProperty *p);
    00133   vtkGetObjectMacro(TextProperty,vtkTextProperty);
    00135
    00136 //BTX
    00141   virtual void ReleaseGraphicsResources(vtkWindow *);
    00142
    00144
    00147   int RenderOpaqueGeometry(vtkViewport* viewport);
    00148   int RenderTranslucentGeometry(vtkViewport* ) {return 0;};
    00149   int RenderOverlay(vtkViewport* viewport);
    00151 //ETX
    00152
    00153 protected:
    00156   void SetMapper(vtkMapper2D *mapper);
    00157
    00158    vtkTextActor();
    00159   ~vtkTextActor();
    00160
    00161   int   MinimumSize[2];
    00162   float MaximumLineHeight;
    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