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 =========================================================================*/
25 #ifndef vtkQtLabelRenderStrategy_h
26 #define vtkQtLabelRenderStrategy_h
27 
28 #include "vtkRenderingQtModule.h" // For export macro
29 #include "vtkLabelRenderStrategy.h"
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 
51  double bds[4]) override
52  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
54  double bds[4]) override;
55 
57 
61  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override
62  { this->Superclass::RenderLabel(x, tprop, label); }
63  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label,
64  int maxWidth) override
65  { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
66  void RenderLabel(int x[2], vtkTextProperty* tprop,
67  vtkUnicodeString label) override;
68  void RenderLabel(int x[2], vtkTextProperty* tprop,
69  vtkUnicodeString label, int maxWidth) override;
71 
75  void StartFrame() override;
76 
80  void EndFrame() override;
81 
87  void ReleaseGraphicsResources(vtkWindow *window) override;
88 
89 protected:
91  ~vtkQtLabelRenderStrategy() override;
92 
93  class Internals;
94  Internals* Implementation;
95 
102  bool AntialiasText; // Should the text be antialiased, inherited from render window.
103 
104 private:
106  void operator=(const vtkQtLabelRenderStrategy&) = delete;
107 };
108 
109 #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:45
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: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:101
vtkQtLabelRenderStrategy::AntialiasText
bool AntialiasText
Definition: vtkQtLabelRenderStrategy.h:102
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:34
vtkLabelRenderStrategy::StartFrame
virtual void StartFrame()
Start a rendering frame.
Definition: vtkLabelRenderStrategy.h:110
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:63
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:100
vtkQtLabelRenderStrategy::PlaneSource
vtkPlaneSource * PlaneSource
Definition: vtkQtLabelRenderStrategy.h:97
vtkQtLabelRenderStrategy::TextureMapToPlane
vtkTextureMapToPlane * TextureMapToPlane
Definition: vtkQtLabelRenderStrategy.h:98
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:96
vtkLabeledDataMapper
draw text labels at dataset points
Definition: vtkLabeledDataMapper.h:70
vtkQtLabelRenderStrategy::Texture
vtkTexture * Texture
Definition: vtkQtLabelRenderStrategy.h:99
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:80
vtkQtLabelRenderStrategy::Implementation
Internals * Implementation
Definition: vtkQtLabelRenderStrategy.h:93
vtkLabelRenderStrategy::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this strategy.
Definition: vtkLabelRenderStrategy.h:122