VTK
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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 __vtkMathTypeUtilities_h
28
29
#include "vtkRenderingFreeTypeModule.h"
// For export macro
30
#include "vtkObject.h"
31
32
class
vtkImageData;
33
class
vtkPath;
34
class
vtkTextProperty;
35
class
vtkTextActor
;
36
class
vtkViewport;
37
38
//----------------------------------------------------------------------------
39
// Singleton cleanup
40
41
class
VTKRENDERINGFREETYPE_EXPORT
vtkMathTextUtilitiesCleanup
42
{
43
public
:
44
vtkMathTextUtilitiesCleanup
();
45
~
vtkMathTextUtilitiesCleanup
();
46
};
47
48
class
VTKRENDERINGFREETYPE_EXPORT
vtkMathTextUtilities
:
public
vtkObject
49
{
50
public
:
51
vtkTypeMacro(
vtkMathTextUtilities
, vtkObject);
52
void
PrintSelf(ostream& os, vtkIndent indent);
53
60
static
vtkMathTextUtilities
*New();
61
63
static
vtkMathTextUtilities
* GetInstance();
64
67
static
void
SetInstance(
vtkMathTextUtilities
*instance);
68
70
72
virtual
bool
GetBoundingBox(vtkTextProperty *tprop,
const
char
*str,
73
unsigned
int
dpi,
int
bbox[4]) = 0;
75
77
82
virtual
bool
RenderString(
const
char
*str, vtkImageData *data,
83
vtkTextProperty *tprop,
84
unsigned
int
dpi,
int
textDims[2] = NULL) = 0;
86
88
90
virtual
bool
StringToPath(
const
char
*str, vtkPath *path,
91
vtkTextProperty *tprop) = 0;
93
95
99
virtual
int
GetConstrainedFontSize(
const
char
*str,
100
vtkTextProperty *tprop,
101
int
targetWidth,
int
targetHeight,
102
unsigned
int
dpi);
104
106
109
virtual
bool
GetScaleToPowerOfTwo() = 0;
110
virtual
void
SetScaleToPowerOfTwo(
bool
scale) = 0;
112
113
protected
:
114
vtkMathTextUtilities
();
115
virtual
~
vtkMathTextUtilities
();
116
117
private
:
118
vtkMathTextUtilities
(
const
vtkMathTextUtilities
&);
// Not implemented.
119
void
operator=(
const
vtkMathTextUtilities
&);
// Not implemented.
120
122
123
static
vtkMathTextUtilities
* Instance;
124
static
vtkMathTextUtilitiesCleanup
Cleanup;
125
};
127
128
#endif
vtkTextActor
An actor that displays text. Scaled or unscaled.
Definition:
vtkTextActor.h:55
vtkMathTextUtilitiesCleanup
Definition:
vtkMathTextUtilities.h:41
vtkMathTextUtilities
Abstract interface to equation rendering.
Definition:
vtkMathTextUtilities.h:48
Generated on Sat Apr 12 2014 01:21:46 for VTK by
1.8.6