zenilib: zenilib/jni/external/freetype2/include/freetype/ftrender.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ftrender.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* ftrender.h */
4 /* */
5 /* FreeType renderer modules public interface (specification). */
6 /* */
7 /* Copyright 1996-2001, 2005, 2006, 2010 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
17
18
19 #ifndef __FTRENDER_H__
20 #define __FTRENDER_H__
21
22
23 #include <ft2build.h>
24 #include FT_MODULE_H
25 #include FT_GLYPH_H
26
27
28 FT_BEGIN_HEADER
29
30
31 /*************************************************************************/
32 /* */
33 /* <Section> */
34 /* module_management */
35 /* */
36 /*************************************************************************/
37
38
39 /* create a new glyph object */
40 typedef FT_Error
41 (*FT_Glyph_InitFunc)( FT_Glyph glyph,
42 FT_GlyphSlot slot );
43
44 /* destroys a given glyph object */
45 typedef void
46 (*FT_Glyph_DoneFunc)( FT_Glyph glyph );
47
48 typedef void
49 (*FT_Glyph_TransformFunc)( FT_Glyph glyph,
50 const FT_Matrix* matrix,
51 const FT_Vector* delta );
52
53 typedef void
54 (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph,
55 FT_BBox* abbox );
56
57 typedef FT_Error
58 (*FT_Glyph_CopyFunc)( FT_Glyph source,
59 FT_Glyph target );
60
61 typedef FT_Error
62 (*FT_Glyph_PrepareFunc)( FT_Glyph glyph,
63 FT_GlyphSlot slot );
64
65 /* deprecated */
66 #define FT_Glyph_Init_Func FT_Glyph_InitFunc
67 #define FT_Glyph_Done_Func FT_Glyph_DoneFunc
68 #define FT_Glyph_Transform_Func FT_Glyph_TransformFunc
69 #define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc
70 #define FT_Glyph_Copy_Func FT_Glyph_CopyFunc
71 #define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc
72
73
74 struct FT_Glyph_Class_
75 {
76 FT_Long glyph_size;
77 FT_Glyph_Format glyph_format;
78 FT_Glyph_InitFunc glyph_init;
79 FT_Glyph_DoneFunc glyph_done;
80 FT_Glyph_CopyFunc glyph_copy;
81 FT_Glyph_TransformFunc glyph_transform;
82 FT_Glyph_GetBBoxFunc glyph_bbox;
83 FT_Glyph_PrepareFunc glyph_prepare;
84 };
85
86
87 typedef FT_Error
88 (*FT_Renderer_RenderFunc)( FT_Renderer renderer,
89 FT_GlyphSlot slot,
90 FT_UInt mode,
91 const FT_Vector* origin );
92
93 typedef FT_Error
94 (*FT_Renderer_TransformFunc)( FT_Renderer renderer,
95 FT_GlyphSlot slot,
96 const FT_Matrix* matrix,
97 const FT_Vector* delta );
98
99
100 typedef void
101 (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer,
102 FT_GlyphSlot slot,
103 FT_BBox* cbox );
104
105
106 typedef FT_Error
107 (*FT_Renderer_SetModeFunc)( FT_Renderer renderer,
108 FT_ULong mode_tag,
109 FT_Pointer mode_ptr );
110
111 /* deprecated identifiers */
112 #define FTRenderer_render FT_Renderer_RenderFunc
113 #define FTRenderer_transform FT_Renderer_TransformFunc
114 #define FTRenderer_getCBox FT_Renderer_GetCBoxFunc
115 #define FTRenderer_setMode FT_Renderer_SetModeFunc
116
117
118 /*************************************************************************/
119 /* */
120 /* <Struct> */
121 /* FT_Renderer_Class */
122 /* */
123 /* <Description> */
124 /* The renderer module class descriptor. */
125 /* */
126 /* <Fields> */
127 /* root :: The root @FT_Module_Class fields. */
128 /* */
129 /* glyph_format :: The glyph image format this renderer handles. */
130 /* */
131 /* render_glyph :: A method used to render the image that is in a */
132 /* given glyph slot into a bitmap. */
133 /* */
134 /* transform_glyph :: A method used to transform the image that is in */
135 /* a given glyph slot. */
136 /* */
137 /* get_glyph_cbox :: A method used to access the glyph's cbox. */
138 /* */
139 /* set_mode :: A method used to pass additional parameters. */
140 /* */
141 /* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
142 /* This is a pointer to its raster's class. */
143 /* */
144 typedef struct FT_Renderer_Class_
145 {
146 FT_Module_Class root;
147
148 FT_Glyph_Format glyph_format;
149
150 FT_Renderer_RenderFunc render_glyph;
151 FT_Renderer_TransformFunc transform_glyph;
152 FT_Renderer_GetCBoxFunc get_glyph_cbox;
153 FT_Renderer_SetModeFunc set_mode;
154
155 FT_Raster_Funcs* raster_class;
156
157 } FT_Renderer_Class;
158
159
160 /*************************************************************************/
161 /* */
162 /* <Function> */
163 /* FT_Get_Renderer */
164 /* */
165 /* <Description> */
166 /* Retrieve the current renderer for a given glyph format. */
167 /* */
168 /* <Input> */
169 /* library :: A handle to the library object. */
170 /* */
171 /* format :: The glyph format. */
172 /* */
173 /* <Return> */
174 /* A renderer handle. 0~if none found. */
175 /* */
176 /* <Note> */
177 /* An error will be returned if a module already exists by that name, */
178 /* or if the module requires a version of FreeType that is too great. */
179 /* */
180 /* To add a new renderer, simply use @FT_Add_Module. To retrieve a */
181 /* renderer by its name, use @FT_Get_Module. */
182 /* */
183 FT_EXPORT( FT_Renderer )
184 FT_Get_Renderer( FT_Library library,
185 FT_Glyph_Format format );
186
187
188 /*************************************************************************/
189 /* */
190 /* <Function> */
191 /* FT_Set_Renderer */
192 /* */
193 /* <Description> */
194 /* Set the current renderer to use, and set additional mode. */
195 /* */
196 /* <InOut> */
197 /* library :: A handle to the library object. */
198 /* */
199 /* <Input> */
200 /* renderer :: A handle to the renderer object. */
201 /* */
202 /* num_params :: The number of additional parameters. */
203 /* */
204 /* parameters :: Additional parameters. */
205 /* */
206 /* <Return> */
207 /* FreeType error code. 0~means success. */
208 /* */
209 /* <Note> */
210 /* In case of success, the renderer will be used to convert glyph */
211 /* images in the renderer's known format into bitmaps. */
212 /* */
213 /* This doesn't change the current renderer for other formats. */
214 /* */
215 /* Currently, only the B/W renderer, if compiled with */
216 /* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */
217 /* anti-aliasing mode; this option must be set directly in */
218 /* `ftraster.c' and is undefined by default) accepts a single tag */
219 /* `pal5' to set its gray palette as a character string with */
220 /* 5~elements. Consequently, the third and fourth argument are zero */
221 /* normally. */
222 /* */
223 FT_EXPORT( FT_Error )
224 FT_Set_Renderer( FT_Library library,
225 FT_Renderer renderer,
226 FT_UInt num_params,
227 FT_Parameter* parameters );
228
229
230 /* */
231
232
233 FT_END_HEADER
234
235 #endif /* __FTRENDER_H__ */
236
237
238 /* END */
FT_Error
int FT_Error
Definition: fttypes.h:296
FT_Glyph_Class_::glyph_transform
FT_Glyph_TransformFunc glyph_transform
Definition: ftrender.h:81
FT_Long
signed long FT_Long
Definition: fttypes.h:238
FT_ULong
unsigned long FT_ULong
Definition: fttypes.h:249
FT_GlyphSlotRec_
Definition: freetype.h:1605
FT_Glyph_InitFunc
FT_BEGIN_HEADER typedef FT_Error(* FT_Glyph_InitFunc)(FT_Glyph glyph, FT_GlyphSlot slot)
Definition: ftrender.h:41
void
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
Definition: glew.h:1824
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
FT_Raster_Funcs_
Definition: ftimage.h:1288
FT_Renderer_Class_::glyph_format
FT_Glyph_Format glyph_format
Definition: ftrender.h:148
FT_Glyph_Class_::glyph_prepare
FT_Glyph_PrepareFunc glyph_prepare
Definition: ftrender.h:83
FT_Matrix_
Definition: fttypes.h:381
abbox
FT_BBox * abbox
Definition: ftbbox.c:576
FT_Glyph_Class_::glyph_copy
FT_Glyph_CopyFunc glyph_copy
Definition: ftrender.h:80
library
FT_Library library
Definition: cffdrivr.c:409
FT_Glyph_PrepareFunc
FT_Error(* FT_Glyph_PrepareFunc)(FT_Glyph glyph, FT_GlyphSlot slot)
Definition: ftrender.h:62
FT_Renderer_Class_::render_glyph
FT_Renderer_RenderFunc render_glyph
Definition: ftrender.h:150
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
target
EGLContext EGLenum target
Definition: eglext.h:87
FT_Glyph_GetBBoxFunc
void(* FT_Glyph_GetBBoxFunc)(FT_Glyph glyph, FT_BBox *abbox)
Definition: ftrender.h:54
FT_Renderer_Class_::root
FT_Module_Class root
Definition: ftrender.h:146
FT_Renderer_Class_::raster_class
FT_Raster_Funcs * raster_class
Definition: ftrender.h:155
FT_Glyph_Class_::glyph_done
FT_Glyph_DoneFunc glyph_done
Definition: ftrender.h:79
FT_RendererRec_
Definition: ftobjs.h:658
FT_Renderer_Class_::transform_glyph
FT_Renderer_TransformFunc transform_glyph
Definition: ftrender.h:151
FT_Pointer
void * FT_Pointer
Definition: fttypes.h:307
FT_GlyphRec_
Definition: ftglyph.h:108
FT_Module_Class_
Definition: ftmodapi.h:159
format
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl2ext.h:845
FT_Vector_
Definition: ftimage.h:75
FT_Renderer_Class_::get_glyph_cbox
FT_Renderer_GetCBoxFunc get_glyph_cbox
Definition: ftrender.h:152
FT_Glyph_Class_::glyph_init
FT_Glyph_InitFunc glyph_init
Definition: ftrender.h:78
FT_Glyph_CopyFunc
FT_Error(* FT_Glyph_CopyFunc)(FT_Glyph source, FT_Glyph target)
Definition: ftrender.h:58
matrix
GLuint GLenum matrix
Definition: glew.h:13408
FT_Renderer_GetCBoxFunc
void(* FT_Renderer_GetCBoxFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox *cbox)
Definition: ftrender.h:101
FT_LibraryRec_
Definition: ftobjs.h:824
FT_Renderer_Class
struct FT_Renderer_Class_ FT_Renderer_Class
FT_Renderer_SetModeFunc
FT_Error(* FT_Renderer_SetModeFunc)(FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr)
Definition: ftrender.h:107
ft2build.h
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
FT_EXPORT
#define FT_EXPORT(x)
Definition: ftconfig.h:500
FT_Glyph_Format
enum FT_Glyph_Format_ FT_Glyph_Format
FT_Renderer_TransformFunc
FT_Error(* FT_Renderer_TransformFunc)(FT_Renderer renderer, FT_GlyphSlot slot, const FT_Matrix *matrix, const FT_Vector *delta)
Definition: ftrender.h:94
FT_Glyph_Class_::glyph_size
FT_Long glyph_size
Definition: ftrender.h:76
FT_Glyph_Class_
Definition: ftrender.h:74
FT_Glyph_Class_::glyph_format
FT_Glyph_Format glyph_format
Definition: ftrender.h:77
FT_Glyph_TransformFunc
void(* FT_Glyph_TransformFunc)(FT_Glyph glyph, const FT_Matrix *matrix, const FT_Vector *delta)
Definition: ftrender.h:49
FT_Glyph_Class_::glyph_bbox
FT_Glyph_GetBBoxFunc glyph_bbox
Definition: ftrender.h:82
FT_Renderer_RenderFunc
FT_Error(* FT_Renderer_RenderFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, const FT_Vector *origin)
Definition: ftrender.h:88
source
GLsizei GLsizei GLchar * source
Definition: gl2ext.h:994
FT_BBox_
Definition: ftimage.h:116
FT_Glyph_DoneFunc
void(* FT_Glyph_DoneFunc)(FT_Glyph glyph)
Definition: ftrender.h:46
mode
GLenum mode
Definition: glew.h:2394
FT_Get_Renderer
FT_Get_Renderer(FT_Library library, FT_Glyph_Format format)
Definition: ftobjs.c:3934
FT_Renderer_Class_
Definition: ftrender.h:144
FT_Renderer_Class_::set_mode
FT_Renderer_SetModeFunc set_mode
Definition: ftrender.h:153
FT_Parameter_
Definition: freetype.h:1763
FT_Set_Renderer
FT_Set_Renderer(FT_Library library, FT_Renderer renderer, FT_UInt num_params, FT_Parameter *parameters)
Definition: ftobjs.c:3946