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) override;
51  static vtkQtLabelRenderStrategy* New();
52 
57  double bds[4]) override
58  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
60  double bds[4]) override;
61 
63 
67  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override
68  { this->Superclass::RenderLabel(x, tprop, label); }
69  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label,
70  int maxWidth) override
71  { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
72  void RenderLabel(int x[2], vtkTextProperty* tprop,
73  vtkUnicodeString label) override;
74  void RenderLabel(int x[2], vtkTextProperty* tprop,
75  vtkUnicodeString label, int maxWidth) override;
77 
81  void StartFrame() override;
82 
86  void EndFrame() override;
87 
93  void ReleaseGraphicsResources(vtkWindow *window) override;
94 
95 protected:
97  ~vtkQtLabelRenderStrategy() override;
98 
99  class Internals;
101 
108  bool AntialiasText; // Should the text be antialiased, inherited from render window.
109 
110 private:
112  void operator=(const vtkQtLabelRenderStrategy&) = delete;
113 };
114 
115 #endif
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:40
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 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: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:71
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth) override
Render a label at a location in world coordinates.
virtual void EndFrame()
End a rendering frame.
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.