VTK  9.0.1
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 =========================================================================*/
25 #ifndef vtkQtLabelRenderStrategy_h
26 #define vtkQtLabelRenderStrategy_h
27 
28 #include "vtkLabelRenderStrategy.h"
29 #include "vtkRenderingQtModule.h" // For export macro
30 
33 class vtkPlaneSource;
36 class vtkTexture;
37 class vtkTexturedActor2D;
39 
40 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
41 {
42 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
45  static vtkQtLabelRenderStrategy* New();
46 
50  void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4]) override
51  {
52  this->Superclass::ComputeLabelBounds(tprop, label, bds);
53  }
54  void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label, double bds[4]) override;
55 
57 
61  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override
62  {
63  this->Superclass::RenderLabel(x, tprop, label);
64  }
65  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int maxWidth) override
66  {
67  this->Superclass::RenderLabel(x, tprop, label, maxWidth);
68  }
69  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label) override;
70  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label, int maxWidth) override;
72 
76  void StartFrame() override;
77 
81  void EndFrame() override;
82 
88  void ReleaseGraphicsResources(vtkWindow* window) override;
89 
90 protected:
92  ~vtkQtLabelRenderStrategy() override;
93 
94  class Internals;
96 
103  bool AntialiasText; // Should the text be antialiased, inherited from render window.
104 
105 private:
107  void operator=(const vtkQtLabelRenderStrategy&) = delete;
108 };
109 
110 #endif
vtkQtLabelRenderStrategy::RenderLabel
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label) override
Render a label at a location in world coordinates.
Definition: vtkQtLabelRenderStrategy.h:61
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:44
vtkLabelRenderStrategy::EndFrame
virtual void EndFrame()
End a rendering frame.
Definition: vtkLabelRenderStrategy.h:117
vtkTexturedActor2D
actor that draws 2D data with texture support
Definition: vtkTexturedActor2D.h:38
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkPlaneSource
create an array of quadrilaterals located in a plane
Definition: vtkPlaneSource.h:54
vtkLabelRenderStrategy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkQtLabelRenderStrategy::Actor
vtkTexturedActor2D * Actor
Definition: vtkQtLabelRenderStrategy.h:102
vtkQtLabelRenderStrategy::AntialiasText
bool AntialiasText
Definition: vtkQtLabelRenderStrategy.h:103
vtkLabelRenderStrategy::RenderLabel
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
Render a label at a location in display coordinates.
Definition: vtkLabelRenderStrategy.h:94
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkLabelRenderStrategy::StartFrame
virtual void StartFrame()
Start a rendering frame.
Definition: vtkLabelRenderStrategy.h:112
vtkQtLabelRenderStrategy
Renders labels with Qt.
Definition: vtkQtLabelRenderStrategy.h:40
vtkTextureMapToPlane
generate texture coordinates by mapping points to plane
Definition: vtkTextureMapToPlane.h:46
vtkQtLabelRenderStrategy::ComputeLabelBounds
void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4]) override
Compute the bounds of a label.
Definition: vtkQtLabelRenderStrategy.h:50
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:65
vtkLabelSizeCalculator
Definition: vtkLabelSizeCalculator.h:48
vtkQtLabelRenderStrategy::RenderLabel
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth) override
Definition: vtkQtLabelRenderStrategy.h:65
vtkQImageToImageSource
Create image data from a QImage.
Definition: vtkQImageToImageSource.h:30
vtkLabelRenderStrategy.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkUnicodeString
String class that stores Unicode text.
Definition: vtkUnicodeString.h:69
vtkQtLabelRenderStrategy::Mapper
vtkPolyDataMapper2D * Mapper
Definition: vtkQtLabelRenderStrategy.h:101
vtkQtLabelRenderStrategy::PlaneSource
vtkPlaneSource * PlaneSource
Definition: vtkQtLabelRenderStrategy.h:98
vtkQtLabelRenderStrategy::TextureMapToPlane
vtkTextureMapToPlane * TextureMapToPlane
Definition: vtkQtLabelRenderStrategy.h:99
vtkLabelRenderStrategy
Superclass for label rendering implementations.
Definition: vtkLabelRenderStrategy.h:36
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:33
vtkQtLabelRenderStrategy::QImageToImage
vtkQImageToImageSource * QImageToImage
Definition: vtkQtLabelRenderStrategy.h:97
vtkLabeledDataMapper
draw text labels at dataset points
Definition: vtkLabeledDataMapper.h:70
vtkQtLabelRenderStrategy::Texture
vtkTexture * Texture
Definition: vtkQtLabelRenderStrategy.h:100
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
vtkLabelRenderStrategy::ComputeLabelBounds
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
Compute the bounds of a label.
Definition: vtkLabelRenderStrategy.h:78
vtkQtLabelRenderStrategy::Implementation
Internals * Implementation
Definition: vtkQtLabelRenderStrategy.h:94
vtkQtLabelRenderStrategy::Internals
Definition: vtkQtLabelRenderStrategyInternals.h:51
vtkLabelRenderStrategy::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this strategy.
Definition: vtkLabelRenderStrategy.h:124