00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00086 #ifndef __vtkCaptionActor2D_h
00087 #define __vtkCaptionActor2D_h
00088
00089 #include "vtkActor2D.h"
00090 #include "vtkTextMapper.h"
00091 #include "vtkPolyData.h"
00092
00093 class vtkPolyDataMapper2D;
00094 class vtkPolyDataMapper;
00095 class vtkScaledTextActor;
00096 class vtkGlyph2D;
00097 class vtkGlyph3D;
00098 class vtkAppendPolyData;
00099 class vtkActor;
00100
00101 class VTK_HYBRID_EXPORT vtkCaptionActor2D : public vtkActor2D
00102 {
00103 public:
00104 vtkTypeMacro(vtkCaptionActor2D,vtkActor2D);
00105 void PrintSelf(ostream& os, vtkIndent indent);
00106
00107 static vtkCaptionActor2D *New();
00108
00110
00112 vtkSetStringMacro(Caption);
00113 vtkGetStringMacro(Caption);
00115
00117
00120 vtkWorldCoordinateMacro(AttachmentPoint);
00122
00124
00125 vtkSetMacro(Border,int);
00126 vtkGetMacro(Border,int);
00127 vtkBooleanMacro(Border,int);
00129
00131
00133 vtkSetMacro(Leader,int);
00134 vtkGetMacro(Leader,int);
00135 vtkBooleanMacro(Leader,int);
00137
00139
00141 vtkSetMacro(ThreeDimensionalLeader,int);
00142 vtkGetMacro(ThreeDimensionalLeader,int);
00143 vtkBooleanMacro(ThreeDimensionalLeader,int);
00145
00147
00150 vtkSetObjectMacro(LeaderGlyph,vtkPolyData);
00151 vtkGetObjectMacro(LeaderGlyph,vtkPolyData);
00153
00155
00160 vtkSetClampMacro(LeaderGlyphSize,float,0.0,0.1);
00161 vtkGetMacro(LeaderGlyphSize,float);
00163
00165
00168 vtkSetClampMacro(MaximumLeaderGlyphSize,int,1,1000);
00169 vtkGetMacro(MaximumLeaderGlyphSize,int);
00171
00173
00175 vtkSetClampMacro(Padding, int, 0, 50);
00176 vtkGetMacro(Padding, int);
00178
00180
00181 vtkSetMacro(Bold, int);
00182 vtkGetMacro(Bold, int);
00183 vtkBooleanMacro(Bold, int);
00185
00187
00188 vtkSetMacro(Italic, int);
00189 vtkGetMacro(Italic, int);
00190 vtkBooleanMacro(Italic, int);
00192
00194
00196 vtkSetMacro(Shadow, int);
00197 vtkGetMacro(Shadow, int);
00198 vtkBooleanMacro(Shadow, int);
00200
00202
00205 vtkSetMacro(FontFamily, int);
00206 vtkGetMacro(FontFamily, int);
00207 void SetFontFamilyToArial() {this->SetFontFamily(VTK_ARIAL);};
00208 void SetFontFamilyToCourier() {this->SetFontFamily(VTK_COURIER);};
00209 void SetFontFamilyToTimes() {this->SetFontFamily(VTK_TIMES);};
00211
00213
00215 vtkSetClampMacro(Justification,int,VTK_TEXT_LEFT,VTK_TEXT_RIGHT);
00216 vtkGetMacro(Justification,int);
00217 void SetJustificationToLeft()
00218 {this->SetJustification(VTK_TEXT_LEFT);}
00219 void SetJustificationToCentered()
00220 {this->SetJustification(VTK_TEXT_CENTERED);}
00221 void SetJustificationToRight()
00222 {this->SetJustification(VTK_TEXT_RIGHT);}
00224
00226
00228 vtkSetClampMacro(VerticalJustification,int,VTK_TEXT_BOTTOM,VTK_TEXT_TOP);
00229 vtkGetMacro(VerticalJustification,int);
00230 void SetVerticalJustificationToBottom()
00231 {this->SetVerticalJustification(VTK_TEXT_BOTTOM);}
00232 void SetVerticalJustificationToCentered()
00233 {this->SetVerticalJustification(VTK_TEXT_CENTERED);}
00234 void SetVerticalJustificationToTop()
00235 {this->SetVerticalJustification(VTK_TEXT_TOP);}
00237
00240 void ShallowCopy(vtkProp *prop);
00241
00242
00247 virtual void ReleaseGraphicsResources(vtkWindow *);
00248
00250
00253 int RenderOpaqueGeometry(vtkViewport* viewport);
00254 int RenderTranslucentGeometry(vtkViewport* ) {return 0;}
00255 int RenderOverlay(vtkViewport* viewport);
00257
00258
00259 protected:
00260 vtkCaptionActor2D();
00261 ~vtkCaptionActor2D();
00262
00263 vtkCoordinate *AttachmentPointCoordinate;
00264
00265 char *Caption;
00266 int Border;
00267 int Leader;
00268 int ThreeDimensionalLeader;
00269 float LeaderGlyphSize;
00270 int MaximumLeaderGlyphSize;
00271 vtkPolyData *LeaderGlyph;
00272
00273 int Padding;
00274 int Bold;
00275 int Italic;
00276 int Shadow;
00277 int FontFamily;
00278 int Justification;
00279 int VerticalJustification;
00280
00281 private:
00282 vtkTextMapper *CaptionMapper;
00283 vtkScaledTextActor *CaptionActor;
00284
00285 vtkPolyData *BorderPolyData;
00286 vtkPolyDataMapper2D *BorderMapper;
00287 vtkActor2D *BorderActor;
00288
00289 vtkPolyData *HeadPolyData;
00290 vtkGlyph3D *HeadGlyph;
00291 vtkPolyData *LeaderPolyData;
00292 vtkAppendPolyData *AppendLeader;
00293
00294
00295 vtkCoordinate *MapperCoordinate2D;
00296 vtkPolyDataMapper2D *LeaderMapper2D;
00297 vtkActor2D *LeaderActor2D;
00298
00299
00300 vtkPolyDataMapper *LeaderMapper3D;
00301 vtkActor *LeaderActor3D;
00302
00303 private:
00304 vtkCaptionActor2D(const vtkCaptionActor2D&);
00305 void operator=(const vtkCaptionActor2D&);
00306 };
00307
00308
00309 #endif
00310
00311
00312