VTK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
home
boeckb
code
depot
group-kitware
vtk
build-release
Utilities
Doxygen
dox
Rendering
FreeType
vtkMathTextUtilities.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkMathTextUtilities.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
=========================================================================*/
26
#ifndef vtkMathTextUtilities_h
27
#define vtkMathTextUtilities_h
28
29
#include "
vtkRenderingFreeTypeModule.h
"
// For export macro
30
#include "
vtkObject.h
"
31
#include "
vtkTextRenderer.h
"
// for metrics
32
33
class
vtkImageData
;
34
class
vtkPath
;
35
class
vtkTextProperty
;
36
class
vtkTextActor
;
37
class
vtkViewport
;
38
39
//----------------------------------------------------------------------------
40
// Singleton cleanup
41
42
class
VTKRENDERINGFREETYPE_EXPORT
vtkMathTextUtilitiesCleanup
43
{
44
public
:
45
vtkMathTextUtilitiesCleanup
();
46
~
vtkMathTextUtilitiesCleanup
();
47
48
private
:
49
vtkMathTextUtilitiesCleanup
(
const
vtkMathTextUtilitiesCleanup
& other);
// no copy constructor
50
vtkMathTextUtilitiesCleanup
& operator=(
const
vtkMathTextUtilitiesCleanup
& rhs);
// no copy assignment
51
};
52
53
class
VTKRENDERINGFREETYPE_EXPORT
vtkMathTextUtilities
:
public
vtkObject
54
{
55
public
:
56
vtkTypeMacro(
vtkMathTextUtilities
,
vtkObject
);
57
void
PrintSelf
(ostream& os,
vtkIndent
indent);
58
60
virtual
bool
IsAvailable
() {
return
false
; }
// Override in subclasses.
61
68
static
vtkMathTextUtilities
*
New
();
69
71
static
vtkMathTextUtilities
* GetInstance();
72
75
static
void
SetInstance(
vtkMathTextUtilities
*instance);
76
78
80
virtual
bool
GetBoundingBox(
vtkTextProperty
*tprop,
const
char
*str,
int
dpi,
81
int
bbox[4]) = 0;
83
85
86
virtual
bool
GetMetrics(
vtkTextProperty
*tprop,
const
char
*str,
int
dpi,
87
vtkTextRenderer::Metrics
&metrics) = 0;
89
91
96
virtual
bool
RenderString(
const
char
*str,
vtkImageData
*
data
,
97
vtkTextProperty
*tprop,
int
dpi,
98
int
textDims[2] = NULL) = 0;
100
102
104
virtual
bool
StringToPath(
const
char
*str,
vtkPath
*path,
105
vtkTextProperty
*tprop,
int
dpi) = 0;
107
109
113
virtual
int
GetConstrainedFontSize(
const
char
*str,
114
vtkTextProperty
*tprop,
115
int
targetWidth,
int
targetHeight,
116
int
dpi);
118
120
123
virtual
bool
GetScaleToPowerOfTwo() = 0;
124
virtual
void
SetScaleToPowerOfTwo(
bool
scale
) = 0;
126
127
protected
:
128
vtkMathTextUtilities
();
129
virtual
~
vtkMathTextUtilities
();
130
131
private
:
132
vtkMathTextUtilities
(
const
vtkMathTextUtilities
&);
// Not implemented.
133
void
operator=(
const
vtkMathTextUtilities
&);
// Not implemented.
134
136
137
static
vtkMathTextUtilities
* Instance;
138
static
vtkMathTextUtilitiesCleanup
Cleanup;
139
};
141
142
#endif
vtkX3D::data
Definition:
vtkX3D.h:315
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:61
vtkMathTextUtilities::IsAvailable
virtual bool IsAvailable()
Definition:
vtkMathTextUtilities.h:60
vtkPath
concrete dataset representing a path defined by Bezier curves.
Definition:
vtkPath.h:34
vtkViewport
abstract specification for Viewports
Definition:
vtkViewport.h:46
VTKRENDERINGFREETYPE_EXPORT
#define VTKRENDERINGFREETYPE_EXPORT
Definition:
vtkRenderingFreeTypeModule.h:15
vtkTextRenderer.h
vtkRenderingFreeTypeModule.h
vtkTextActor
An actor that displays text. Scaled or unscaled.
Definition:
vtkTextActor.h:54
vtkMathTextUtilitiesCleanup
Definition:
vtkMathTextUtilities.h:42
vtkObject::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:38
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:44
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:38
vtkTextRenderer::Metrics
Definition:
vtkTextRenderer.h:77
vtkMathTextUtilities
Abstract interface to equation rendering.
Definition:
vtkMathTextUtilities.h:53
vtkObject::New
static vtkObject * New()
vtkObject.h
vtkX3D::scale
Definition:
vtkX3D.h:229
Generated by
1.8.9.1