VTK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
home
demarle
Builds
VTK
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
=========================================================================*/
27
#ifndef vtkMathTextUtilities_h
28
#define vtkMathTextUtilities_h
29
30
#include "vtkRenderingFreeTypeModule.h"
// For export macro
31
#include "
vtkObject.h
"
32
#include "
vtkTextRenderer.h
"
// for metrics
33
34
class
vtkImageData
;
35
class
vtkPath
;
36
class
vtkTextProperty
;
37
class
vtkTextActor
;
38
class
vtkViewport
;
39
40
//----------------------------------------------------------------------------
41
// Singleton cleanup
42
43
class
VTKRENDERINGFREETYPE_EXPORT
vtkMathTextUtilitiesCleanup
44
{
45
public
:
46
vtkMathTextUtilitiesCleanup
();
47
~
vtkMathTextUtilitiesCleanup
();
48
49
private
:
50
vtkMathTextUtilitiesCleanup
(
const
vtkMathTextUtilitiesCleanup
& other) VTK_DELETE_FUNCTION;
51
vtkMathTextUtilitiesCleanup
& operator=(
const
vtkMathTextUtilitiesCleanup
& rhs) VTK_DELETE_FUNCTION;
52
};
53
54
class
VTKRENDERINGFREETYPE_EXPORT
vtkMathTextUtilities
:
public
vtkObject
55
{
56
public
:
57
vtkTypeMacro(
vtkMathTextUtilities
,
vtkObject
);
58
void
PrintSelf
(ostream& os,
vtkIndent
indent);
59
63
virtual
bool
IsAvailable
() {
return
false
; }
// Override in subclasses.
64
73
static
vtkMathTextUtilities
*
New
();
74
78
static
vtkMathTextUtilities
* GetInstance();
79
84
static
void
SetInstance(
vtkMathTextUtilities
*instance);
85
90
virtual
bool
GetBoundingBox(
vtkTextProperty
*tprop,
const
char
*str,
int
dpi,
91
int
bbox[4]) = 0;
92
96
virtual
bool
GetMetrics(
vtkTextProperty
*tprop,
const
char
*str,
int
dpi,
97
vtkTextRenderer::Metrics
&metrics) = 0;
98
106
virtual
bool
RenderString(
const
char
*str,
vtkImageData
*
data
,
107
vtkTextProperty
*tprop,
int
dpi,
108
int
textDims[2] = NULL) = 0;
109
114
virtual
bool
StringToPath(
const
char
*str,
vtkPath
*path,
115
vtkTextProperty
*tprop,
int
dpi) = 0;
116
123
virtual
int
GetConstrainedFontSize(
const
char
*str,
124
vtkTextProperty
*tprop,
125
int
targetWidth,
int
targetHeight,
126
int
dpi);
127
129
134
virtual
bool
GetScaleToPowerOfTwo() = 0;
135
virtual
void
SetScaleToPowerOfTwo(
bool
scale
) = 0;
137
138
protected
:
139
vtkMathTextUtilities
();
140
virtual
~
vtkMathTextUtilities
();
141
142
private
:
143
vtkMathTextUtilities
(
const
vtkMathTextUtilities
&) VTK_DELETE_FUNCTION;
144
void
operator=(const
vtkMathTextUtilities
&) VTK_DELETE_FUNCTION;
145
147
150
static
vtkMathTextUtilities
* Instance;
151
static
vtkMathTextUtilitiesCleanup
Cleanup;
152
};
154
155
#endif
vtkX3D::data
Definition:
vtkX3D.h:315
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkMathTextUtilities::IsAvailable
virtual bool IsAvailable()
Returns true if mathtext rendering is available.
Definition:
vtkMathTextUtilities.h:63
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPath
concrete dataset representing a path defined by Bezier curves.
Definition:
vtkPath.h:35
vtkViewport
abstract specification for Viewports
Definition:
vtkViewport.h:47
vtkTextRenderer.h
vtkTextActor
An actor that displays text.
Definition:
vtkTextActor.h:56
vtkMathTextUtilitiesCleanup
Definition:
vtkMathTextUtilities.h:43
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:45
vtkTextProperty
represent text properties.
Definition:
vtkTextProperty.h:39
vtkTextRenderer::Metrics
Definition:
vtkTextRenderer.h:78
vtkMathTextUtilities
Abstract interface to equation rendering.
Definition:
vtkMathTextUtilities.h:54
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkObject.h
vtkX3D::scale
Definition:
vtkX3D.h:229
Generated by
1.8.9.1