VTK  9.3.1
vtkQtLabelRenderStrategy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkQtLabelRenderStrategy_h
17 #define vtkQtLabelRenderStrategy_h
18 
19 #include "vtkLabelRenderStrategy.h"
20 #include "vtkRenderingQtModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
25 class vtkPlaneSource;
28 class vtkTexture;
29 class vtkTexturedActor2D;
31 
32 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
33 {
34 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
37  static vtkQtLabelRenderStrategy* New();
38 
42  void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4]) override;
43 
45 
49  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override;
50  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int maxWidth) override;
52 
56  void StartFrame() override;
57 
61  void EndFrame() override;
62 
68  void ReleaseGraphicsResources(vtkWindow* window) override;
69 
70 protected:
72  ~vtkQtLabelRenderStrategy() override;
73 
74  class Internals;
76 
83  bool AntialiasText; // Should the text be antialiased, inherited from render window.
84 
85 private:
87  void operator=(const vtkQtLabelRenderStrategy&) = delete;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
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:27
a simple class to control print indentation
Definition: vtkIndent.h:28
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:57
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