VTK  9.3.20240328
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;
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:
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
a simple class to control print indentation
Definition: vtkIndent.h:108
Superclass for label rendering implementations.
This filter takes an input dataset, an array to process (which must be a string array),...
draw text labels at dataset points
create an array of quadrilaterals located in a plane
draw vtkPolyData onto the image plane
Create image data from a QImage.
void EndFrame() override
End a rendering frame.
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label) override
Render a label at a location in world coordinates.
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources that are being consumed by this strategy.
vtkTextureMapToPlane * TextureMapToPlane
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth) override
Render a label at a location in world coordinates.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkQtLabelRenderStrategy() override
vtkQImageToImageSource * QImageToImage
void StartFrame() override
Start a rendering frame.
void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4]) override
Compute the bounds of a label.
static vtkQtLabelRenderStrategy * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:78
represent text properties.
generate texture coordinates by mapping points to plane
handles properties associated with a texture map
Definition: vtkTexture.h:167
actor that draws 2D data with texture support
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47