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 =========================================================================*/
25 #ifndef vtkQtLabelRenderStrategy_h
26 #define vtkQtLabelRenderStrategy_h
27 
28 #include "vtkRenderingQtModule.h" // For export macro
29 #include "vtkLabelRenderStrategy.h"
30 
33 class vtkPlaneSource;
36 class vtkTexture;
37 class vtkTexturedActor2D;
39 
40 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
41 {
42  public:
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45  static vtkQtLabelRenderStrategy* New();
46 
51  double bds[4]) VTK_OVERRIDE
52  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
54  double bds[4]) VTK_OVERRIDE;
55 
57 
61  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) VTK_OVERRIDE
62  { this->Superclass::RenderLabel(x, tprop, label); }
63  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label,
64  int maxWidth) VTK_OVERRIDE
65  { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
66  void RenderLabel(int x[2], vtkTextProperty* tprop,
67  vtkUnicodeString label) VTK_OVERRIDE;
68  void RenderLabel(int x[2], vtkTextProperty* tprop,
69  vtkUnicodeString label, int maxWidth) VTK_OVERRIDE;
71 
75  void StartFrame() VTK_OVERRIDE;
76 
80  void EndFrame() VTK_OVERRIDE;
81 
87  void ReleaseGraphicsResources(vtkWindow *window) VTK_OVERRIDE;
88 
89 protected:
91  ~vtkQtLabelRenderStrategy() VTK_OVERRIDE;
92 
93  class Internals;
94  Internals* Implementation;
95 
96  vtkQImageToImageSource* QImageToImage;
97  vtkPlaneSource* PlaneSource;
98  vtkTextureMapToPlane* TextureMapToPlane;
99  vtkTexture* Texture;
102  bool AntialiasText; // Should the text be antialiased, inherited from render window.
103 
104 private:
105  vtkQtLabelRenderStrategy(const vtkQtLabelRenderStrategy&) VTK_DELETE_FUNCTION;
106  void operator=(const vtkQtLabelRenderStrategy&) VTK_DELETE_FUNCTION;
107 };
108 
109 #endif
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:41
Superclass for label rendering implementations.
actor that draws 2D data with texture support
Renders labels with Qt.
draw text labels at dataset points
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
Compute the bounds of a label.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label) override
Render a label at a location in world coordinates.
a simple class to control print indentation
Definition: vtkIndent.h:33
handles properties associated with a texture map
Definition: vtkTexture.h:64
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth) override
Render a label at a location in world coordinates.
represent text properties.
create an array of quadrilaterals located in a plane
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
Render a label at a location in display coordinates.
virtual void StartFrame()
Start a rendering frame.
This filter takes an input dataset, an array to process (which must be a string array), and a text property.
draw vtkPolyData onto the image plane
generate texture coordinates by mapping points to plane
String class that stores Unicode text.
void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4]) override
Compute the bounds of a label.