VTK  9.2.6
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 =========================================================================*/
28 #ifndef vtkQtLabelRenderStrategy_h
29 #define vtkQtLabelRenderStrategy_h
30 
31 #include "vtkLabelRenderStrategy.h"
32 #include "vtkRenderingQtModule.h" // For export macro
33 
36 class vtkPlaneSource;
39 class vtkTexture;
40 class vtkTexturedActor2D;
42 
43 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
44 {
45 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48  static vtkQtLabelRenderStrategy* New();
49 
53  void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4]) override;
54 
56 
60  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override;
61  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int maxWidth) override;
63 
67  void StartFrame() override;
68 
72  void EndFrame() override;
73 
79  void ReleaseGraphicsResources(vtkWindow* window) override;
80 
81 protected:
83  ~vtkQtLabelRenderStrategy() override;
84 
85  class Internals;
87 
94  bool AntialiasText; // Should the text be antialiased, inherited from render window.
95 
96 private:
98  void operator=(const vtkQtLabelRenderStrategy&) = delete;
99 };
100 
101 #endif
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
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
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
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.
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])=0
Compute the bounds of a label.
handles properties associated with a texture map
Definition: vtkTexture.h:68
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.
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)=0
Render a label at a location in display coordinates.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
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