FTGL
2.1.3~rc5
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
src
FTGL
FTGlyph.h
Go to the documentation of this file.
1
/*
2
* FTGL - OpenGL font library
3
*
4
* Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
5
* Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
6
* Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
7
*
8
* Permission is hereby granted, free of charge, to any person obtaining
9
* a copy of this software and associated documentation files (the
10
* "Software"), to deal in the Software without restriction, including
11
* without limitation the rights to use, copy, modify, merge, publish,
12
* distribute, sublicense, and/or sell copies of the Software, and to
13
* permit persons to whom the Software is furnished to do so, subject to
14
* the following conditions:
15
*
16
* The above copyright notice and this permission notice shall be
17
* included in all copies or substantial portions of the Software.
18
*
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
*/
27
28
#ifndef __ftgl__
29
# warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
30
# include <
FTGL/ftgl.h
>
31
#endif
32
33
#ifndef __FTGlyph__
34
#define __FTGlyph__
35
36
#ifdef __cplusplus
37
38
class
FTGlyphImpl;
39
50
class
FTGL_EXPORT
FTGlyph
51
{
52
protected
:
58
FTGlyph
(FT_GlyphSlot glyph);
59
60
private
:
67
FTGlyph
(FTGlyphImpl *pImpl);
68
69
/* Allow our internal subclasses to access the private constructor */
70
friend
class
FTBitmapGlyph
;
71
friend
class
FTBufferGlyph
;
72
friend
class
FTExtrudeGlyph
;
73
friend
class
FTOutlineGlyph
;
74
friend
class
FTPixmapGlyph
;
75
friend
class
FTPolygonGlyph
;
76
friend
class
FTTextureGlyph
;
77
78
public
:
82
virtual
~FTGlyph
();
83
91
virtual
const
FTPoint
&
Render
(
const
FTPoint
& pen,
int
renderMode) = 0;
92
98
virtual
float
Advance
()
const
;
99
105
virtual
const
FTBBox
&
BBox
()
const
;
106
112
virtual
FT_Error
Error
()
const
;
113
114
private
:
118
FTGlyphImpl *impl;
119
};
120
121
#endif //__cplusplus
122
123
FTGL_BEGIN_C_DECLS
124
132
struct
_FTGLGlyph;
133
typedef
struct
_FTGLglyph
FTGLglyph
;
134
145
FTGL_EXPORT
FTGLglyph
*
ftglCreateCustomGlyph
(
FTGLglyph
*base,
void
*data,
146
void
(*renderCallback) (
FTGLglyph
*,
void
*,
FTGL_DOUBLE
,
FTGL_DOUBLE
,
147
int
,
FTGL_DOUBLE
*,
FTGL_DOUBLE
*),
148
void
(*destroyCallback) (
FTGLglyph
*,
void
*));
149
155
FTGL_EXPORT
void
ftglDestroyGlyph
(
FTGLglyph
*glyph);
156
170
FTGL_EXPORT
void
ftglRenderGlyph
(
FTGLglyph
*glyph,
FTGL_DOUBLE
penx,
171
FTGL_DOUBLE
peny,
int
renderMode,
172
FTGL_DOUBLE
*advancex,
FTGL_DOUBLE
*advancey);
179
FTGL_EXPORT
float
ftglGetGlyphAdvance
(
FTGLglyph
*glyph);
180
188
FTGL_EXPORT
void
ftglGetGlyphBBox
(
FTGLglyph
*glyph,
float
bounds[6]);
189
196
FTGL_EXPORT
FT_Error
ftglGetGlyphError
(
FTGLglyph
* glyph);
197
198
FTGL_END_C_DECLS
199
200
#endif // __FTGlyph__
201
Generated by
1.8.1.1