VTK: Rendering/Qt/vtkQtLabelRenderStrategy.h Source File

| 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
23 class vtkLabelSizeCalculator;
24 class vtkLabeledDataMapper;
25 class vtkPlaneSource;
26 class vtkPolyDataMapper2D;
27 class vtkQImageToImageSource;
28 class vtkTexture;
29 class vtkTexturedActor2D;
30 class vtkTextureMapToPlane;
31
32 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
33 {
34 public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36 vtkTypeMacro(vtkQtLabelRenderStrategy, vtkLabelRenderStrategy);
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:
71 vtkQtLabelRenderStrategy();
72 ~vtkQtLabelRenderStrategy() override;
73
74 class Internals;
75 Internals* Implementation;
76
77 vtkQImageToImageSource* QImageToImage;
78 vtkPlaneSource* PlaneSource;
79 vtkTextureMapToPlane* TextureMapToPlane;
80 vtkTexture* Texture;
81 vtkPolyDataMapper2D* Mapper;
82 vtkTexturedActor2D* Actor;
83 bool AntialiasText; // Should the text be antialiased, inherited from render window.
84
85 private:
86 vtkQtLabelRenderStrategy(const vtkQtLabelRenderStrategy&) = delete;
87 void operator=(const vtkQtLabelRenderStrategy&) = delete;
88 };
89
90 VTK_ABI_NAMESPACE_END
91 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkLabelRenderStrategy
Superclass for label rendering implementations.
Definition: vtkLabelRenderStrategy.h:25
vtkLabelSizeCalculator
This filter takes an input dataset, an array to process (which must be a string array),...
Definition: vtkLabelSizeCalculator.h:41
vtkLabeledDataMapper
draw text labels at dataset points
Definition: vtkLabeledDataMapper.h:75
vtkPlaneSource
create an array of quadrilaterals located in a plane
Definition: vtkPlaneSource.h:59
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:49
vtkQImageToImageSource
Create image data from a QImage.
Definition: vtkQImageToImageSource.h:30
vtkQtLabelRenderStrategy::Internals
Definition: vtkQtLabelRenderStrategyInternals.h:42
vtkQtLabelRenderStrategy
Renders labels with Qt.
Definition: vtkQtLabelRenderStrategy.h:33
vtkQtLabelRenderStrategy::Actor
vtkTexturedActor2D * Actor
Definition: vtkQtLabelRenderStrategy.h:82
vtkQtLabelRenderStrategy::Implementation
Internals * Implementation
Definition: vtkQtLabelRenderStrategy.h:74
vtkQtLabelRenderStrategy::EndFrame
void EndFrame() override
End a rendering frame.
vtkQtLabelRenderStrategy::RenderLabel
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label) override
Render a label at a location in world coordinates.
vtkQtLabelRenderStrategy::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources that are being consumed by this strategy.
vtkQtLabelRenderStrategy::TextureMapToPlane
vtkTextureMapToPlane * TextureMapToPlane
Definition: vtkQtLabelRenderStrategy.h:79
vtkQtLabelRenderStrategy::RenderLabel
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth) override
Render a label at a location in world coordinates.
vtkQtLabelRenderStrategy::AntialiasText
bool AntialiasText
Definition: vtkQtLabelRenderStrategy.h:83
vtkQtLabelRenderStrategy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkQtLabelRenderStrategy::~vtkQtLabelRenderStrategy
~vtkQtLabelRenderStrategy() override
vtkQtLabelRenderStrategy::Mapper
vtkPolyDataMapper2D * Mapper
Definition: vtkQtLabelRenderStrategy.h:81
vtkQtLabelRenderStrategy::QImageToImage
vtkQImageToImageSource * QImageToImage
Definition: vtkQtLabelRenderStrategy.h:77
vtkQtLabelRenderStrategy::StartFrame
void StartFrame() override
Start a rendering frame.
vtkQtLabelRenderStrategy::vtkQtLabelRenderStrategy
vtkQtLabelRenderStrategy()
vtkQtLabelRenderStrategy::ComputeLabelBounds
void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4]) override
Compute the bounds of a label.
vtkQtLabelRenderStrategy::Texture
vtkTexture * Texture
Definition: vtkQtLabelRenderStrategy.h:80
vtkQtLabelRenderStrategy::PlaneSource
vtkPlaneSource * PlaneSource
Definition: vtkQtLabelRenderStrategy.h:78
vtkQtLabelRenderStrategy::New
static vtkQtLabelRenderStrategy * New()
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:35
vtkTextureMapToPlane
generate texture coordinates by mapping points to plane
Definition: vtkTextureMapToPlane.h:48
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:67
vtkTexturedActor2D
actor that draws 2D data with texture support
Definition: vtkTexturedActor2D.h:31
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkLabelRenderStrategy.h