VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
vtkLabelRenderStrategy.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkLabelRenderStrategy.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
=========================================================================*/
22
#ifndef __vtkLabelRenderStrategy_h
23
#define __vtkLabelRenderStrategy_h
24
25
#include "
vtkObject.h
"
26
27
#include "
vtkStdString.h
"
// For string support
28
#include "
vtkUnicodeString.h
"
// For unicode string support
29
30
class
vtkRenderer
;
31
class
vtkWindow
;
32
class
vtkTextProperty
;
33
34
class
VTK_RENDERING_EXPORT
vtkLabelRenderStrategy
:
public
vtkObject
35
{
36
public
:
37
void
PrintSelf
(ostream& os,
vtkIndent
indent);
38
vtkTypeMacro(
vtkLabelRenderStrategy
,
vtkObject
);
39
41
44
virtual
bool
SupportsRotation()
45
{
return
true
; }
47
49
54
virtual
bool
SupportsBoundedSize()
55
{
return
true
; }
57
59
60
virtual
void
SetRenderer(
vtkRenderer
* ren);
61
vtkGetObjectMacro(Renderer,
vtkRenderer
);
63
65
66
virtual
void
SetDefaultTextProperty(
vtkTextProperty
* tprop);
67
vtkGetObjectMacro(DefaultTextProperty,
vtkTextProperty
);
69
71
74
virtual
void
ComputeLabelBounds(
vtkTextProperty
* tprop,
vtkStdString
label,
75
double
bds[4])
76
{ this->
ComputeLabelBounds
(tprop,
vtkUnicodeString::from_utf8
(label.c_str()),
77
bds); }
78
virtual
void
ComputeLabelBounds(
vtkTextProperty
* tprop,
vtkUnicodeString
label,
79
double
bds[4]) = 0;
81
83
90
virtual
void
RenderLabel(
int
x[2],
vtkTextProperty
* tprop,
vtkStdString
label)
91
{ this->
RenderLabel
(x, tprop,
vtkUnicodeString::from_utf8
(label)); }
92
virtual
void
RenderLabel(
int
x[2],
vtkTextProperty
* tprop,
vtkStdString
label,
93
int
maxWidth)
94
{ this->
RenderLabel
(x, tprop,
vtkUnicodeString::from_utf8
(label), maxWidth); }
95
virtual
void
RenderLabel(
int
x[2],
vtkTextProperty
* tprop,
96
vtkUnicodeString
label) = 0;
97
virtual
void
RenderLabel(
int
x[2],
vtkTextProperty
* tprop,
98
vtkUnicodeString
label,
int
vtkNotUsed(maxWidth))
99
{ this->
RenderLabel
(x, tprop, label); }
101
103
virtual
void
StartFrame
() { }
104
106
virtual
void
EndFrame
() { }
107
111
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*) { }
112
113
protected
:
114
vtkLabelRenderStrategy
();
115
~
vtkLabelRenderStrategy
();
116
117
vtkRenderer
*
Renderer
;
118
vtkTextProperty
*
DefaultTextProperty
;
119
120
private
:
121
vtkLabelRenderStrategy
(
const
vtkLabelRenderStrategy
&);
// Not implemented.
122
void
operator=(
const
vtkLabelRenderStrategy
&);
// Not implemented.
123
};
124
125
#endif
126
Generated on Wed May 30 2012 13:22:22 for VTK by
1.8.1