VTK
dox
Rendering
Core
vtkTextMapper.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkTextMapper.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
=========================================================================*/
35
#ifndef vtkTextMapper_h
36
#define vtkTextMapper_h
37
38
#include "vtkRenderingCoreModule.h"
// For export macro
39
#include "
vtkMapper2D.h
"
40
41
#include "
vtkNew.h
"
// For vtkNew
42
43
class
vtkActor2D
;
44
class
vtkImageData
;
45
class
vtkPoints
;
46
class
vtkPolyData
;
47
class
vtkPolyDataMapper2D
;
48
class
vtkTextProperty
;
49
class
vtkTexture
;
50
class
vtkTimeStamp
;
51
class
vtkViewport
;
52
53
class
VTKRENDERINGCORE_EXPORT
vtkTextMapper
:
public
vtkMapper2D
54
{
55
public
:
56
vtkTypeMacro(
vtkTextMapper
,
vtkMapper2D
);
57
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
58
62
static
vtkTextMapper
*
New
();
63
65
69
virtual
void
GetSize(
vtkViewport
*,
int
size
[2]);
70
virtual
int
GetWidth(
vtkViewport
*v);
71
virtual
int
GetHeight(
vtkViewport
*v);
73
75
78
vtkSetStringMacro(Input)
79
vtkGetStringMacro(Input)
81
83
86
virtual
void
SetTextProperty(
vtkTextProperty
*p);
87
vtkGetObjectMacro(TextProperty,
vtkTextProperty
);
89
93
void
ShallowCopy
(
vtkAbstractMapper
*m)
override
;
94
96
102
virtual
int
SetConstrainedFontSize(
vtkViewport
*,
int
targetWidth,
int
targetHeight);
103
static
int
SetConstrainedFontSize(
vtkTextMapper
*,
vtkViewport
*,
int
targetWidth,
int
targetHeight);
105
113
static
int
SetMultipleConstrainedFontSize(
vtkViewport
*,
114
int
targetWidth,
int
targetHeight,
115
vtkTextMapper
** mappers,
116
int
nbOfMappers,
117
int
* maxResultingSize);
118
120
124
static
int
SetRelativeFontSize(
vtkTextMapper
*,
vtkViewport
*,
int
*winSize,
125
int
*stringSize,
float
sizeFactor=0.0);
126
static
int
SetMultipleRelativeFontSize(
vtkViewport
*viewport,
127
vtkTextMapper
**textMappers,
128
int
nbOfMappers,
int
*winSize,
129
int
*stringSize,
float
sizeFactor);
131
132
void
RenderOverlay
(
vtkViewport
*,
vtkActor2D
*)
override
;
133
void
ReleaseGraphicsResources
(
vtkWindow
*)
override
;
134
vtkMTimeType
GetMTime
()
override
;
135
136
protected
:
137
vtkTextMapper
();
138
~
vtkTextMapper
()
override
;
139
140
char
*
Input
;
141
vtkTextProperty
*
TextProperty
;
142
143
private
:
144
vtkTextMapper
(
const
vtkTextMapper
&) =
delete
;
145
void
operator=(
const
vtkTextMapper
&) =
delete
;
146
147
void
UpdateQuad(
vtkActor2D
*actor,
int
dpi);
148
void
UpdateImage(
int
dpi);
149
150
int
TextDims[2];
151
152
int
RenderedDPI;
153
vtkTimeStamp
CoordsTime;
154
vtkTimeStamp
TCoordsTime;
155
vtkNew<vtkImageData>
Image;
156
vtkNew<vtkPoints>
Points;
157
vtkNew<vtkPolyData>
PolyData;
158
vtkNew<vtkPolyDataMapper2D>
Mapper;
159
vtkNew<vtkTexture>
Texture;
160
};
161
162
#endif
vtkPoints
represent and manipulate 3D points
Definition:
vtkPoints.h:39
vtkMapper2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition:
vtkPolyDataMapper2D.h:51
vtkMapper2D::RenderOverlay
virtual void RenderOverlay(vtkViewport *, vtkActor2D *)
Definition:
vtkMapper2D.h:41
vtkTextMapper::Input
char * Input
Definition:
vtkTextMapper.h:140
vtkTimeStamp
record modification and/or execution time
Definition:
vtkTimeStamp.h:35
vtkAbstractMapper::GetMTime
vtkMTimeType GetMTime() override
Override Modifiedtime as we have added Clipping planes.
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:37
vtkTexture
handles properties associated with a texture map
Definition:
vtkTexture.h:71
vtkTextMapper
2D text annotation
Definition:
vtkTextMapper.h:53
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkMapper2D.h
vtkTextMapper::TextProperty
vtkTextProperty * TextProperty
Definition:
vtkTextMapper.h:141
vtkAbstractMapper::ShallowCopy
virtual void ShallowCopy(vtkAbstractMapper *m)
Make a shallow copy of this mapper.
vtkX3D::size
Definition:
vtkX3D.h:253
vtkNew< vtkImageData >
vtkAbstractMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
Definition:
vtkAbstractMapper.h:71
vtkMapper2D
abstract class specifies interface for objects which render 2D actors
Definition:
vtkMapper2D.h:35
vtkViewport
abstract specification for Viewports
Definition:
vtkViewport.h:47
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:39
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkActor2D
a actor that draws 2D data
Definition:
vtkActor2D.h:45
vtkNew.h
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition:
vtkPolyData.h:85
vtkAbstractMapper
abstract class specifies interface to map data
Definition:
vtkAbstractMapper.h:55
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition:
vtkType.h:302
Generated by
1.8.16