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

ftrender.h
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftrender.h                                                             */
00004 /*                                                                         */
00005 /*    FreeType renderer modules public interface (specification).          */
00006 /*                                                                         */
00007 /*  Copyright 1996-2001, 2005, 2006, 2010 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 __FTRENDER_H__
00020 #define __FTRENDER_H__
00021 
00022 
00023 #include <ft2build.h>
00024 #include FT_MODULE_H
00025 #include FT_GLYPH_H
00026 
00027 
00028 FT_BEGIN_HEADER
00029 
00030 
00031   /*************************************************************************/
00032   /*                                                                       */
00033   /* <Section>                                                             */
00034   /*    module_management                                                  */
00035   /*                                                                       */
00036   /*************************************************************************/
00037 
00038 
00039   /* create a new glyph object */
00040   typedef FT_Error
00041   (*FT_Glyph_InitFunc)( FT_Glyph      glyph,
00042                         FT_GlyphSlot  slot );
00043 
00044   /* destroys a given glyph object */
00045   typedef void
00046   (*FT_Glyph_DoneFunc)( FT_Glyph  glyph );
00047 
00048   typedef void
00049   (*FT_Glyph_TransformFunc)( FT_Glyph          glyph,
00050                              const FT_Matrix*  matrix,
00051                              const FT_Vector*  delta );
00052 
00053   typedef void
00054   (*FT_Glyph_GetBBoxFunc)( FT_Glyph  glyph,
00055                            FT_BBox*  abbox );
00056 
00057   typedef FT_Error
00058   (*FT_Glyph_CopyFunc)( FT_Glyph   source,
00059                         FT_Glyph   target );
00060 
00061   typedef FT_Error
00062   (*FT_Glyph_PrepareFunc)( FT_Glyph      glyph,
00063                            FT_GlyphSlot  slot );
00064 
00065 /* deprecated */
00066 #define FT_Glyph_Init_Func       FT_Glyph_InitFunc
00067 #define FT_Glyph_Done_Func       FT_Glyph_DoneFunc
00068 #define FT_Glyph_Transform_Func  FT_Glyph_TransformFunc
00069 #define FT_Glyph_BBox_Func       FT_Glyph_GetBBoxFunc
00070 #define FT_Glyph_Copy_Func       FT_Glyph_CopyFunc
00071 #define FT_Glyph_Prepare_Func    FT_Glyph_PrepareFunc
00072 
00073 
00074   struct  FT_Glyph_Class_
00075   {
00076     FT_Long                 glyph_size;
00077     FT_Glyph_Format         glyph_format;
00078     FT_Glyph_InitFunc       glyph_init;
00079     FT_Glyph_DoneFunc       glyph_done;
00080     FT_Glyph_CopyFunc       glyph_copy;
00081     FT_Glyph_TransformFunc  glyph_transform;
00082     FT_Glyph_GetBBoxFunc    glyph_bbox;
00083     FT_Glyph_PrepareFunc    glyph_prepare;
00084   };
00085 
00086 
00087   typedef FT_Error
00088   (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,
00089                              FT_GlyphSlot      slot,
00090                              FT_UInt           mode,
00091                              const FT_Vector*  origin );
00092 
00093   typedef FT_Error
00094   (*FT_Renderer_TransformFunc)( FT_Renderer       renderer,
00095                                 FT_GlyphSlot      slot,
00096                                 const FT_Matrix*  matrix,
00097                                 const FT_Vector*  delta );
00098 
00099 
00100   typedef void
00101   (*FT_Renderer_GetCBoxFunc)( FT_Renderer   renderer,
00102                               FT_GlyphSlot  slot,
00103                               FT_BBox*      cbox );
00104 
00105 
00106   typedef FT_Error
00107   (*FT_Renderer_SetModeFunc)( FT_Renderer  renderer,
00108                               FT_ULong     mode_tag,
00109                               FT_Pointer   mode_ptr );
00110 
00111 /* deprecated identifiers */
00112 #define FTRenderer_render  FT_Renderer_RenderFunc
00113 #define FTRenderer_transform  FT_Renderer_TransformFunc
00114 #define FTRenderer_getCBox  FT_Renderer_GetCBoxFunc
00115 #define FTRenderer_setMode  FT_Renderer_SetModeFunc
00116 
00117 
00118   /*************************************************************************/
00119   /*                                                                       */
00120   /* <Struct>                                                              */
00121   /*    FT_Renderer_Class                                                  */
00122   /*                                                                       */
00123   /* <Description>                                                         */
00124   /*    The renderer module class descriptor.                              */
00125   /*                                                                       */
00126   /* <Fields>                                                              */
00127   /*    root            :: The root @FT_Module_Class fields.               */
00128   /*                                                                       */
00129   /*    glyph_format    :: The glyph image format this renderer handles.   */
00130   /*                                                                       */
00131   /*    render_glyph    :: A method used to render the image that is in a  */
00132   /*                       given glyph slot into a bitmap.                 */
00133   /*                                                                       */
00134   /*    transform_glyph :: A method used to transform the image that is in */
00135   /*                       a given glyph slot.                             */
00136   /*                                                                       */
00137   /*    get_glyph_cbox  :: A method used to access the glyph's cbox.       */
00138   /*                                                                       */
00139   /*    set_mode        :: A method used to pass additional parameters.    */
00140   /*                                                                       */
00141   /*    raster_class    :: For @FT_GLYPH_FORMAT_OUTLINE renderers only.    */
00142   /*                       This is a pointer to its raster's class.        */
00143   /*                                                                       */
00144   typedef struct  FT_Renderer_Class_
00145   {
00146     FT_Module_Class            root;
00147 
00148     FT_Glyph_Format            glyph_format;
00149 
00150     FT_Renderer_RenderFunc     render_glyph;
00151     FT_Renderer_TransformFunc  transform_glyph;
00152     FT_Renderer_GetCBoxFunc    get_glyph_cbox;
00153     FT_Renderer_SetModeFunc    set_mode;
00154 
00155     FT_Raster_Funcs*           raster_class;
00156 
00157   } FT_Renderer_Class;
00158 
00159 
00160   /*************************************************************************/
00161   /*                                                                       */
00162   /* <Function>                                                            */
00163   /*    FT_Get_Renderer                                                    */
00164   /*                                                                       */
00165   /* <Description>                                                         */
00166   /*    Retrieve the current renderer for a given glyph format.            */
00167   /*                                                                       */
00168   /* <Input>                                                               */
00169   /*    library :: A handle to the library object.                         */
00170   /*                                                                       */
00171   /*    format  :: The glyph format.                                       */
00172   /*                                                                       */
00173   /* <Return>                                                              */
00174   /*    A renderer handle.  0~if none found.                               */
00175   /*                                                                       */
00176   /* <Note>                                                                */
00177   /*    An error will be returned if a module already exists by that name, */
00178   /*    or if the module requires a version of FreeType that is too great. */
00179   /*                                                                       */
00180   /*    To add a new renderer, simply use @FT_Add_Module.  To retrieve a   */
00181   /*    renderer by its name, use @FT_Get_Module.                          */
00182   /*                                                                       */
00183   FT_EXPORT( FT_Renderer )
00184   FT_Get_Renderer( FT_Library       library,
00185                    FT_Glyph_Format  format );
00186 
00187 
00188   /*************************************************************************/
00189   /*                                                                       */
00190   /* <Function>                                                            */
00191   /*    FT_Set_Renderer                                                    */
00192   /*                                                                       */
00193   /* <Description>                                                         */
00194   /*    Set the current renderer to use, and set additional mode.          */
00195   /*                                                                       */
00196   /* <InOut>                                                               */
00197   /*    library    :: A handle to the library object.                      */
00198   /*                                                                       */
00199   /* <Input>                                                               */
00200   /*    renderer   :: A handle to the renderer object.                     */
00201   /*                                                                       */
00202   /*    num_params :: The number of additional parameters.                 */
00203   /*                                                                       */
00204   /*    parameters :: Additional parameters.                               */
00205   /*                                                                       */
00206   /* <Return>                                                              */
00207   /*    FreeType error code.  0~means success.                             */
00208   /*                                                                       */
00209   /* <Note>                                                                */
00210   /*    In case of success, the renderer will be used to convert glyph     */
00211   /*    images in the renderer's known format into bitmaps.                */
00212   /*                                                                       */
00213   /*    This doesn't change the current renderer for other formats.        */
00214   /*                                                                       */
00215   FT_EXPORT( FT_Error )
00216   FT_Set_Renderer( FT_Library     library,
00217                    FT_Renderer    renderer,
00218                    FT_UInt        num_params,
00219                    FT_Parameter*  parameters );
00220 
00221 
00222   /* */
00223 
00224 
00225 FT_END_HEADER
00226 
00227 #endif /* __FTRENDER_H__ */
00228 
00229 
00230 /* END */

Generated on Sun May 27 2012 04:33:31 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.