zenilib: zenilib/jni/external/freetype2/src/cache/ftcimage.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
ftcimage.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* ftcimage.h */
4 /* */
5 /* FreeType Generic Image cache (specification) */
6 /* */
7 /* Copyright 2000-2001, 2002, 2003, 2006 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 /*
20 * FTC_ICache is an _abstract_ cache used to store a single FT_Glyph
21 * image per cache node.
22 *
23 * FTC_ICache extends FTC_GCache. For an implementation example,
24 * see FTC_ImageCache in `src/cache/ftbasic.c'.
25 */
26
27
28 /*************************************************************************/
29 /* */
30 /* Each image cache really manages FT_Glyph objects. */
31 /* */
32 /*************************************************************************/
33
34
35 #ifndef __FTCIMAGE_H__
36 #define __FTCIMAGE_H__
37
38
39 #include <ft2build.h>
40 #include FT_CACHE_H
41 #include "ftcglyph.h"
42
43 FT_BEGIN_HEADER
44
45
46 /* the FT_Glyph image node type - we store only 1 glyph per node */
47 typedef struct FTC_INodeRec_
48 {
49 FTC_GNodeRec gnode;
50 FT_Glyph glyph;
51
52 } FTC_INodeRec, *FTC_INode;
53
54 #define FTC_INODE( x ) ( (FTC_INode)( x ) )
55 #define FTC_INODE_GINDEX( x ) FTC_GNODE(x)->gindex
56 #define FTC_INODE_FAMILY( x ) FTC_GNODE(x)->family
57
58 typedef FT_Error
59 (*FTC_IFamily_LoadGlyphFunc)( FTC_Family family,
60 FT_UInt gindex,
61 FTC_Cache cache,
62 FT_Glyph *aglyph );
63
64 typedef struct FTC_IFamilyClassRec_
65 {
66 FTC_MruListClassRec clazz;
67 FTC_IFamily_LoadGlyphFunc family_load_glyph;
68
69 } FTC_IFamilyClassRec;
70
71 typedef const FTC_IFamilyClassRec* FTC_IFamilyClass;
72
73 #define FTC_IFAMILY_CLASS( x ) ((FTC_IFamilyClass)(x))
74
75 #define FTC_CACHE__IFAMILY_CLASS( x ) \
76 FTC_IFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS(x)->family_class )
77
78
79 /* can be used as a @FTC_Node_FreeFunc */
80 FT_LOCAL( void )
81 FTC_INode_Free( FTC_INode inode,
82 FTC_Cache cache );
83
84 /* Can be used as @FTC_Node_NewFunc. `gquery.index' and `gquery.family'
85 * must be set correctly. This function will call the `family_load_glyph'
86 * method to load the FT_Glyph into the cache node.
87 */
88 FT_LOCAL( FT_Error )
89 FTC_INode_New( FTC_INode *pinode,
90 FTC_GQuery gquery,
91 FTC_Cache cache );
92
93 #if 0
94 /* can be used as @FTC_Node_WeightFunc */
95 FT_LOCAL( FT_ULong )
96 FTC_INode_Weight( FTC_INode inode );
97 #endif
98
99
100 /* */
101
102 FT_END_HEADER
103
104 #endif /* __FTCIMAGE_H__ */
105
106
107 /* END */
FTC_IFamilyClassRec_::family_load_glyph
FTC_IFamily_LoadGlyphFunc family_load_glyph
Definition: ftcimage.h:67
FTC_INodeRec_
Definition: ftcimage.h:47
FT_Error
int FT_Error
Definition: fttypes.h:296
FT_ULong
unsigned long FT_ULong
Definition: fttypes.h:249
FTC_IFamilyClassRec_::clazz
FTC_MruListClassRec clazz
Definition: ftcimage.h:66
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
FTC_INode_New
FTC_INode_New(FTC_INode *pinode, FTC_GQuery gquery, FTC_Cache cache)
Definition: ftcimage.c:58
FTC_CacheRec_
Definition: ftccache.h:150
ftcglyph.h
FTC_INodeRec_::gnode
FTC_GNodeRec gnode
Definition: ftcimage.h:49
FTC_GNodeRec_
Definition: ftcglyph.h:148
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_LOCAL
#define FT_LOCAL(x)
Definition: ftconfig.h:466
FTC_IFamilyClass
const FTC_IFamilyClassRec * FTC_IFamilyClass
Definition: ftcimage.h:71
FTC_IFamilyClassRec
struct FTC_IFamilyClassRec_ FTC_IFamilyClassRec
FTC_INode_Free
FTC_INode_Free(FTC_INode inode, FTC_Cache cache)
Definition: ftcimage.c:49
FTC_IFamilyClassRec_
Definition: ftcimage.h:64
FT_GlyphRec_
Definition: ftglyph.h:108
FTC_Family
FT_BEGIN_HEADER struct FTC_FamilyRec_ * FTC_Family
FTC_MruListClassRec_
Definition: ftcmru.h:108
ft2build.h
FT_UInt
unsigned int FT_UInt
Definition: fttypes.h:227
FTC_GQueryRec_
Definition: ftcglyph.h:160
FTC_IFamily_LoadGlyphFunc
FT_Error(* FTC_IFamily_LoadGlyphFunc)(FTC_Family family, FT_UInt gindex, FTC_Cache cache, FT_Glyph *aglyph)
Definition: ftcimage.h:59
FTC_INode
FT_BEGIN_HEADER struct FTC_INodeRec_ * FTC_INode
FTC_INodeRec_::glyph
FT_Glyph glyph
Definition: ftcimage.h:50
FTC_INodeRec
FT_BEGIN_HEADER struct FTC_INodeRec_ FTC_INodeRec