ReactOS 0.4.16-dev-1025-gd3456f5
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 (C) 1996-2019 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
29
30
31 /**************************************************************************
32 *
33 * @section:
34 * module_management
35 *
36 */
37
38
39 /* create a new glyph object */
40 typedef FT_Error
43
44 /* destroys a given glyph object */
45 typedef void
46 (*FT_Glyph_DoneFunc)( FT_Glyph glyph );
47
48 typedef void
50 const FT_Matrix* matrix,
51 const FT_Vector* delta );
52
53 typedef void
55 FT_BBox* abbox );
56
57 typedef FT_Error
60
61 typedef FT_Error
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
75 {
78
85 };
86
87
88 typedef FT_Error
92 const FT_Vector* origin );
93
94 typedef FT_Error
97 const FT_Matrix* matrix,
98 const FT_Vector* delta );
99
100
101 typedef void
104 FT_BBox* cbox );
105
106
107 typedef FT_Error
109 FT_ULong mode_tag,
110 FT_Pointer mode_ptr );
111
112/* deprecated identifiers */
113#define FTRenderer_render FT_Renderer_RenderFunc
114#define FTRenderer_transform FT_Renderer_TransformFunc
115#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc
116#define FTRenderer_setMode FT_Renderer_SetModeFunc
117
118
119 /**************************************************************************
120 *
121 * @struct:
122 * FT_Renderer_Class
123 *
124 * @description:
125 * The renderer module class descriptor.
126 *
127 * @fields:
128 * root ::
129 * The root @FT_Module_Class fields.
130 *
131 * glyph_format ::
132 * The glyph image format this renderer handles.
133 *
134 * render_glyph ::
135 * A method used to render the image that is in a given glyph slot into
136 * a bitmap.
137 *
138 * transform_glyph ::
139 * A method used to transform the image that is in a given glyph slot.
140 *
141 * get_glyph_cbox ::
142 * A method used to access the glyph's cbox.
143 *
144 * set_mode ::
145 * A method used to pass additional parameters.
146 *
147 * raster_class ::
148 * For @FT_GLYPH_FORMAT_OUTLINE renderers only. This is a pointer to
149 * its raster's class.
150 */
151 typedef struct FT_Renderer_Class_
152 {
154
156
161
163
165
166
167 /**************************************************************************
168 *
169 * @function:
170 * FT_Get_Renderer
171 *
172 * @description:
173 * Retrieve the current renderer for a given glyph format.
174 *
175 * @input:
176 * library ::
177 * A handle to the library object.
178 *
179 * format ::
180 * The glyph format.
181 *
182 * @return:
183 * A renderer handle. 0~if none found.
184 *
185 * @note:
186 * An error will be returned if a module already exists by that name, or
187 * if the module requires a version of FreeType that is too great.
188 *
189 * To add a new renderer, simply use @FT_Add_Module. To retrieve a
190 * renderer by its name, use @FT_Get_Module.
191 */
195
196
197 /**************************************************************************
198 *
199 * @function:
200 * FT_Set_Renderer
201 *
202 * @description:
203 * Set the current renderer to use, and set additional mode.
204 *
205 * @inout:
206 * library ::
207 * A handle to the library object.
208 *
209 * @input:
210 * renderer ::
211 * A handle to the renderer object.
212 *
213 * num_params ::
214 * The number of additional parameters.
215 *
216 * parameters ::
217 * Additional parameters.
218 *
219 * @return:
220 * FreeType error code. 0~means success.
221 *
222 * @note:
223 * In case of success, the renderer will be used to convert glyph images
224 * in the renderer's known format into bitmaps.
225 *
226 * This doesn't change the current renderer for other formats.
227 *
228 * Currently, no FreeType renderer module uses `parameters`; you should
229 * thus always pass `NULL` as the value.
230 */
233 FT_Renderer renderer,
234 FT_UInt num_params,
235 FT_Parameter* parameters );
236
237 /* */
238
239
241
242#endif /* FTRENDER_H_ */
243
244
245/* END */
FT_Library library
Definition: cffdrivr.c:661
enum FT_Render_Mode_ FT_Render_Mode
FT_BBox * abbox
Definition: ftbbox.c:465
#define FT_EXPORT(x)
Definition: ftconfig.h:481
#define FT_END_HEADER
Definition: ftheader.h:54
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
enum FT_Glyph_Format_ FT_Glyph_Format
void(* FT_Glyph_DoneFunc)(FT_Glyph glyph)
Definition: ftrender.h:46
FT_Set_Renderer(FT_Library library, FT_Renderer renderer, FT_UInt num_params, FT_Parameter *parameters)
Definition: ftobjs.c:4471
FT_BEGIN_HEADER typedef FT_Error(* FT_Glyph_InitFunc)(FT_Glyph glyph, FT_GlyphSlot slot)
Definition: ftrender.h:41
FT_Error(* FT_Glyph_CopyFunc)(FT_Glyph source, FT_Glyph target)
Definition: ftrender.h:58
void(* FT_Glyph_TransformFunc)(FT_Glyph glyph, const FT_Matrix *matrix, const FT_Vector *delta)
Definition: ftrender.h:49
FT_Error(* FT_Renderer_SetModeFunc)(FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr)
Definition: ftrender.h:108
FT_Get_Renderer(FT_Library library, FT_Glyph_Format format)
Definition: ftobjs.c:4459
FT_Error(* FT_Renderer_TransformFunc)(FT_Renderer renderer, FT_GlyphSlot slot, const FT_Matrix *matrix, const FT_Vector *delta)
Definition: ftrender.h:95
void(* FT_Glyph_GetBBoxFunc)(FT_Glyph glyph, FT_BBox *abbox)
Definition: ftrender.h:54
FT_Error(* FT_Glyph_PrepareFunc)(FT_Glyph glyph, FT_GlyphSlot slot)
Definition: ftrender.h:62
void(* FT_Renderer_GetCBoxFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox *cbox)
Definition: ftrender.h:102
struct FT_Renderer_Class_ FT_Renderer_Class
FT_Error(* FT_Renderer_RenderFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
Definition: ftrender.h:89
unsigned long FT_ULong
Definition: fttypes.h:253
int FT_Error
Definition: fttypes.h:299
signed long FT_Long
Definition: fttypes.h:242
unsigned int FT_UInt
Definition: fttypes.h:231
GLuint GLenum matrix
Definition: glext.h:9407
GLenum mode
Definition: glext.h:6217
GLenum target
Definition: glext.h:7315
voidpf uLong int origin
Definition: ioapi.h:144
FT_Glyph_GetBBoxFunc glyph_bbox
Definition: ftrender.h:83
FT_Long glyph_size
Definition: ftrender.h:76
FT_Glyph_Format glyph_format
Definition: ftrender.h:77
FT_Glyph_TransformFunc glyph_transform
Definition: ftrender.h:82
FT_Glyph_InitFunc glyph_init
Definition: ftrender.h:79
FT_Glyph_DoneFunc glyph_done
Definition: ftrender.h:80
FT_Glyph_PrepareFunc glyph_prepare
Definition: ftrender.h:84
FT_Glyph_CopyFunc glyph_copy
Definition: ftrender.h:81
FT_Renderer_TransformFunc transform_glyph
Definition: ftrender.h:158
FT_Glyph_Format glyph_format
Definition: ftrender.h:155
FT_Module_Class root
Definition: ftrender.h:153
FT_Renderer_GetCBoxFunc get_glyph_cbox
Definition: ftrender.h:159
FT_Raster_Funcs * raster_class
Definition: ftrender.h:162
FT_Renderer_RenderFunc render_glyph
Definition: ftrender.h:157
FT_Renderer_SetModeFunc set_mode
Definition: ftrender.h:160
Definition: format.c:58
struct _slot slot
Definition: vfat.h:196