ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ftgloadr.h
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftgloadr.h                                                             */
00004 /*                                                                         */
00005 /*    The FreeType glyph loader (specification).                           */
00006 /*                                                                         */
00007 /*  Copyright 2002, 2003, 2005, 2006 by                                    */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #ifndef __FTGLOADR_H__
00020 #define __FTGLOADR_H__
00021 
00022 
00023 #include <ft2build.h>
00024 #include FT_FREETYPE_H
00025 
00026 
00027 FT_BEGIN_HEADER
00028 
00029 
00030   /*************************************************************************/
00031   /*                                                                       */
00032   /* <Struct>                                                              */
00033   /*    FT_GlyphLoader                                                     */
00034   /*                                                                       */
00035   /* <Description>                                                         */
00036   /*    The glyph loader is an internal object used to load several glyphs */
00037   /*    together (for example, in the case of composites).                 */
00038   /*                                                                       */
00039   /* <Note>                                                                */
00040   /*    The glyph loader implementation is not part of the high-level API, */
00041   /*    hence the forward structure declaration.                           */
00042   /*                                                                       */
00043   typedef struct FT_GlyphLoaderRec_*  FT_GlyphLoader ;
00044 
00045 
00046 #if 0  /* moved to freetype.h in version 2.2 */
00047 #define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
00048 #define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
00049 #define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
00050 #define FT_SUBGLYPH_FLAG_SCALE                   8
00051 #define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
00052 #define FT_SUBGLYPH_FLAG_2X2                  0x80
00053 #define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
00054 #endif
00055 
00056 
00057   typedef struct  FT_SubGlyphRec_
00058   {
00059     FT_Int     index;
00060     FT_UShort  flags;
00061     FT_Int     arg1;
00062     FT_Int     arg2;
00063     FT_Matrix  transform;
00064 
00065   } FT_SubGlyphRec;
00066 
00067 
00068   typedef struct  FT_GlyphLoadRec_
00069   {
00070     FT_Outline   outline;       /* outline                   */
00071     FT_Vector*   extra_points;  /* extra points table        */
00072     FT_Vector*   extra_points2; /* second extra points table */
00073     FT_UInt      num_subglyphs; /* number of subglyphs       */
00074     FT_SubGlyph  subglyphs;     /* subglyphs                 */
00075 
00076   } FT_GlyphLoadRec, *FT_GlyphLoad;
00077 
00078 
00079   typedef struct  FT_GlyphLoaderRec_
00080   {
00081     FT_Memory        memory;
00082     FT_UInt          max_points;
00083     FT_UInt          max_contours;
00084     FT_UInt          max_subglyphs;
00085     FT_Bool          use_extra;
00086 
00087     FT_GlyphLoadRec  base;
00088     FT_GlyphLoadRec  current;
00089 
00090     void*            other;            /* for possible future extension? */
00091 
00092   } FT_GlyphLoaderRec;
00093 
00094 
00095   /* create new empty glyph loader */
00096   FT_BASE( FT_Error )
00097   FT_GlyphLoader_New( FT_Memory        memory,
00098                       FT_GlyphLoader  *aloader );
00099 
00100   /* add an extra points table to a glyph loader */
00101   FT_BASE( FT_Error )
00102   FT_GlyphLoader_CreateExtra( FT_GlyphLoader  loader );
00103 
00104   /* destroy a glyph loader */
00105   FT_BASE( void )
00106   FT_GlyphLoader_Done( FT_GlyphLoader  loader );
00107 
00108   /* reset a glyph loader (frees everything int it) */
00109   FT_BASE( void )
00110   FT_GlyphLoader_Reset( FT_GlyphLoader  loader );
00111 
00112   /* rewind a glyph loader */
00113   FT_BASE( void )
00114   FT_GlyphLoader_Rewind( FT_GlyphLoader  loader );
00115 
00116   /* check that there is enough space to add `n_points' and `n_contours' */
00117   /* to the glyph loader                                                 */
00118   FT_BASE( FT_Error )
00119   FT_GlyphLoader_CheckPoints( FT_GlyphLoader  loader,
00120                               FT_UInt         n_points,
00121                               FT_UInt         n_contours );
00122 
00123 
00124 #define FT_GLYPHLOADER_CHECK_P( _loader, _count )                         \
00125    ( (_count) == 0 || ((_loader)->base.outline.n_points    +              \
00126                        (_loader)->current.outline.n_points +              \
00127                        (unsigned long)(_count)) <= (_loader)->max_points )
00128 
00129 #define FT_GLYPHLOADER_CHECK_C( _loader, _count )                          \
00130   ( (_count) == 0 || ((_loader)->base.outline.n_contours    +              \
00131                       (_loader)->current.outline.n_contours +              \
00132                       (unsigned long)(_count)) <= (_loader)->max_contours )
00133 
00134 #define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours )      \
00135   ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points )   &&                  \
00136       FT_GLYPHLOADER_CHECK_C( _loader, _contours ) )                   \
00137     ? 0                                                                \
00138     : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) )
00139 
00140 
00141   /* check that there is enough space to add `n_subs' sub-glyphs to */
00142   /* a glyph loader                                                 */
00143   FT_BASE( FT_Error )
00144   FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader  loader,
00145                                  FT_UInt         n_subs );
00146 
00147   /* prepare a glyph loader, i.e. empty the current glyph */
00148   FT_BASE( void )
00149   FT_GlyphLoader_Prepare( FT_GlyphLoader  loader );
00150 
00151   /* add the current glyph to the base glyph */
00152   FT_BASE( void )
00153   FT_GlyphLoader_Add( FT_GlyphLoader  loader );
00154 
00155   /* copy points from one glyph loader to another */
00156   FT_BASE( FT_Error )
00157   FT_GlyphLoader_CopyPoints( FT_GlyphLoader  target,
00158                              FT_GlyphLoader  source );
00159 
00160  /* */
00161 
00162 
00163 FT_END_HEADER
00164 
00165 #endif /* __FTGLOADR_H__ */
00166 
00167 
00168 /* END */

Generated on Fri May 25 2012 04:32:05 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.