00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkActor2D.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 =========================================================================*/ 00034 #ifndef __vtkActor2D_h 00035 #define __vtkActor2D_h 00036 00037 #include "vtkProp.h" 00038 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro 00039 00040 class vtkMapper2D; 00041 class vtkProperty2D; 00042 00043 class VTK_FILTERING_EXPORT vtkActor2D : public vtkProp 00044 { 00045 public: 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 vtkTypeRevisionMacro(vtkActor2D,vtkProp); 00048 00051 static vtkActor2D* New(); 00052 00054 00055 int RenderOverlay(vtkViewport *viewport); 00056 int RenderOpaqueGeometry(vtkViewport *viewport); 00057 int RenderTranslucentGeometry(vtkViewport *viewport); 00059 00061 00062 virtual void SetMapper(vtkMapper2D *mapper); 00063 vtkGetObjectMacro(Mapper, vtkMapper2D); 00065 00067 00068 vtkSetMacro(LayerNumber, int); 00069 vtkGetMacro(LayerNumber, int); 00071 00074 vtkProperty2D* GetProperty(); 00075 00077 virtual void SetProperty(vtkProperty2D*); 00078 00080 00083 vtkViewportCoordinateMacro(Position); 00085 00087 void SetDisplayPosition(int,int); 00088 00090 00094 vtkViewportCoordinateMacro(Position2); 00096 00098 00101 void SetWidth(double w); 00102 double GetWidth(); 00103 void SetHeight(double h); 00104 double GetHeight(); 00106 00108 unsigned long GetMTime(); 00109 00113 virtual void GetActors2D(vtkPropCollection *pc); 00114 00117 void ShallowCopy(vtkProp *prop); 00118 00122 virtual void ReleaseGraphicsResources(vtkWindow *); 00123 00125 00128 virtual vtkCoordinate *GetActualPositionCoordinate(void) 00129 { return this->PositionCoordinate; } 00131 00133 00136 virtual vtkCoordinate *GetActualPosition2Coordinate(void) 00137 { return this->Position2Coordinate; } 00139 00140 protected: 00141 vtkActor2D(); 00142 ~vtkActor2D(); 00143 00144 vtkMapper2D *Mapper; 00145 int LayerNumber; 00146 vtkProperty2D *Property; 00147 vtkCoordinate *PositionCoordinate; 00148 vtkCoordinate *Position2Coordinate; 00149 private: 00150 vtkActor2D(const vtkActor2D&); // Not implemented. 00151 void operator=(const vtkActor2D&); // Not implemented. 00152 }; 00153 00154 #endif 00155 00156 00157