VTK
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 =========================================================================*/
31 #ifndef vtkQtLabelRenderStrategy_h
32 #define vtkQtLabelRenderStrategy_h
33 
34 #include "vtkRenderingQtModule.h" // For export macro
35 #include "vtkLabelRenderStrategy.h"
36 
39 class vtkPlaneSource;
42 class vtkTexture;
43 class vtkTexturedActor2D;
45 
46 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
47 {
48  public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
51  static vtkQtLabelRenderStrategy* New();
52 
57  double bds[4]) override
58  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
60  double bds[4]) override;
61 
63 
67  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override
68  { this->Superclass::RenderLabel(x, tprop, label); }
69  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label,
70  int maxWidth) override
71  { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
72  void RenderLabel(int x[2], vtkTextProperty* tprop,
73  vtkUnicodeString label) override;
74  void RenderLabel(int x[2], vtkTextProperty* tprop,
75  vtkUnicodeString label, int maxWidth) override;
77 
81  void StartFrame() override;
82 
86  void EndFrame() override;
87 
93  void ReleaseGraphicsResources(vtkWindow *window) override;
94 
95 protected:
97  ~vtkQtLabelRenderStrategy() override;
98 
99  class Internals;
101 
108  bool AntialiasText; // Should the text be antialiased, inherited from render window.
109 
110 private:
112  void operator=(const vtkQtLabelRenderStrategy&) = delete;
113 };
114 
115 #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:67
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:51
vtkLabelRenderStrategy::EndFrame
virtual void EndFrame()
End a rendering frame.
Definition: vtkLabelRenderStrategy.h:115
vtkTexturedActor2D
actor that draws 2D data with texture support
Definition: vtkTexturedActor2D.h:41
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:60
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:107
vtkQtLabelRenderStrategy::AntialiasText
bool AntialiasText
Definition: vtkQtLabelRenderStrategy.h:108
vtkLabelRenderStrategy::RenderLabel
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
Render a label at a location in display coordinates.
Definition: vtkLabelRenderStrategy.h:96
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkLabelRenderStrategy::StartFrame
virtual void StartFrame()
Start a rendering frame.
Definition: vtkLabelRenderStrategy.h:110
vtkQtLabelRenderStrategy
Renders labels with Qt.
Definition: vtkQtLabelRenderStrategy.h:46
vtkTextureMapToPlane
generate texture coordinates by mapping points to plane
Definition: vtkTextureMapToPlane.h:49
vtkQtLabelRenderStrategy::ComputeLabelBounds
void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4]) override
Compute the bounds of a label.
Definition: vtkQtLabelRenderStrategy.h:56
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:71
vtkLabelSizeCalculator
Definition: vtkLabelSizeCalculator.h:51
vtkQtLabelRenderStrategy::RenderLabel
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int maxWidth) override
Definition: vtkQtLabelRenderStrategy.h:69
vtkQImageToImageSource
Create image data from a QImage.
Definition: vtkQImageToImageSource.h:30
vtkLabelRenderStrategy.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkUnicodeString
String class that stores Unicode text.
Definition: vtkUnicodeString.h:72
vtkQtLabelRenderStrategy::Mapper
vtkPolyDataMapper2D * Mapper
Definition: vtkQtLabelRenderStrategy.h:106
vtkQtLabelRenderStrategy::PlaneSource
vtkPlaneSource * PlaneSource
Definition: vtkQtLabelRenderStrategy.h:103
vtkQtLabelRenderStrategy::TextureMapToPlane
vtkTextureMapToPlane * TextureMapToPlane
Definition: vtkQtLabelRenderStrategy.h:104
vtkLabelRenderStrategy
Superclass for label rendering implementations.
Definition: vtkLabelRenderStrategy.h:36
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:39
vtkQtLabelRenderStrategy::QImageToImage
vtkQImageToImageSource * QImageToImage
Definition: vtkQtLabelRenderStrategy.h:102
vtkLabeledDataMapper
draw text labels at dataset points
Definition: vtkLabeledDataMapper.h:76
vtkQtLabelRenderStrategy::Texture
vtkTexture * Texture
Definition: vtkQtLabelRenderStrategy.h:105
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:40
vtkLabelRenderStrategy::ComputeLabelBounds
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
Compute the bounds of a label.
Definition: vtkLabelRenderStrategy.h:80
vtkQtLabelRenderStrategy::Implementation
Internals * Implementation
Definition: vtkQtLabelRenderStrategy.h:99
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:122