VTK
vtkQtLabelRenderStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtLabelRenderStrategy.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkQtLabelRenderStrategy_h
31 #define vtkQtLabelRenderStrategy_h
32 
33 #include "vtkRenderingQtModule.h" // For export macro
34 #include "vtkLabelRenderStrategy.h"
35 
38 class vtkPlaneSource;
41 class vtkTexture;
42 class vtkTexturedActor2D;
44 
46 {
47  public:
48  void PrintSelf(ostream& os, vtkIndent indent);
50  static vtkQtLabelRenderStrategy* New();
51 
53 
55  virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label,
56  double bds[4])
57  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
58  virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label,
59  double bds[4]);
61 
63 
65  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label)
66  { this->Superclass::RenderLabel(x, tprop, label); }
67  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label,
68  int maxWidth)
69  { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
70  virtual void RenderLabel(int x[2], vtkTextProperty* tprop,
71  vtkUnicodeString label);
72  virtual void RenderLabel(int x[2], vtkTextProperty* tprop,
73  vtkUnicodeString label, int maxWidth);
75 
77  virtual void StartFrame();
78 
80  virtual void EndFrame();
81 
85  virtual void ReleaseGraphicsResources(vtkWindow *window);
86 
87 protected:
90 
91  //BTX
92  class Internals;
93  Internals* Implementation;
94  //ETX
95 
102  bool AntialiasText; // Should the text be antialiased, inherited from render window.
103 
104 private:
105  vtkQtLabelRenderStrategy(const vtkQtLabelRenderStrategy&); // Not implemented.
106  void operator=(const vtkQtLabelRenderStrategy&); // Not implemented.
107 };
108 
109 #endif
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
Superclass for label rendering implementations.
actor that draws 2D data with texture support
vtkTextureMapToPlane * TextureMapToPlane
vtkQImageToImageSource * QImageToImage
Renders labels with Qt.
draw text labels at dataset points
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void ReleaseGraphicsResources(vtkWindow *)
handles properties associated with a texture map
Definition: vtkTexture.h:69
represent text properties.
create an array of quadrilaterals located in a plane
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth)
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
#define VTKRENDERINGQT_EXPORT
static vtkObject * New()
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
draw vtkPolyData onto the image plane
generate texture coordinates by mapping points to plane
String class that stores Unicode text.