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 =========================================================================*/
31 #ifndef vtkQtLabelRenderStrategy_h
32 #define vtkQtLabelRenderStrategy_h
33 
34 #include "vtkRenderingQtModule.h" // For export macro
35 #include "vtkLabelRenderStrategy.h"
36 
39 class vtkPlaneSource;
42 class vtkTexture;
43 class vtkTexturedActor2D;
45 
46 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
47 {
48  public:
49  void PrintSelf(ostream& os, vtkIndent indent);
51  static vtkQtLabelRenderStrategy* New();
52 
56  virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label,
57  double bds[4])
58  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
59  virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label,
60  double bds[4]);
61 
63 
67  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label)
68  { this->Superclass::RenderLabel(x, tprop, label); }
69  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label,
70  int maxWidth)
71  { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
72  virtual void RenderLabel(int x[2], vtkTextProperty* tprop,
73  vtkUnicodeString label);
74  virtual void RenderLabel(int x[2], vtkTextProperty* tprop,
75  vtkUnicodeString label, int maxWidth);
77 
81  virtual void StartFrame();
82 
86  virtual void EndFrame();
87 
93  virtual void ReleaseGraphicsResources(vtkWindow *window);
94 
95 protected:
98 
99  class Internals;
100  Internals* Implementation;
101 
108  bool AntialiasText; // Should the text be antialiased, inherited from render window.
109 
110 private:
111  vtkQtLabelRenderStrategy(const vtkQtLabelRenderStrategy&) VTK_DELETE_FUNCTION;
112  void operator=(const vtkQtLabelRenderStrategy&) VTK_DELETE_FUNCTION;
113 };
114 
115 #endif
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:47
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])
Compute the bounds of a label.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this strategy.
handles properties associated with a texture map
Definition: vtkTexture.h:70
virtual void EndFrame()
End a rendering frame.
represent text properties.
create an array of quadrilaterals located in a plane
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth)
Render a label at a location in world coordinates.
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
Render a label at a location in world coordinates.
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 ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
Compute the bounds of a label.
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.