⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ftimage.h

📁 赫赫大名的 OGRE 游戏引擎
💻 H
📖 第 1 页 / 共 5 页
字号:
  /*                                                                       */  /* <Description>                                                         */  /*    An enumeration to list the bit flags as used in the `flags' field  */  /*    of a FT_Raster_Params structure.                                   */  /*                                                                       */  /* <Fields>                                                              */  /*    ft_raster_flag_default :: This value is 0.                         */  /*                                                                       */  /*    ft_raster_flag_aa      :: This flag is set to indicate that an     */  /*                              anti-aliased glyph image should be       */  /*                              generated.  Otherwise, it will be        */  /*                              monochrome (1-bit)                       */  /*                                                                       */  /*    ft_raster_flag_direct  :: This flag is set to indicate direct      */  /*                              rendering.  In this mode, client         */  /*                              applications must provide their own span */  /*                              callback.  This lets them directly       */  /*                              draw or compose over an existing bitmap. */  /*                              If this bit is not set, the target       */  /*                              pixmap's buffer _must_ be zeroed before  */  /*                              rendering.                               */  /*                                                                       */  /*                              Note that for now, direct rendering is   */  /*                              only possible with anti-aliased glyphs.  */  /*                                                                       */  /*    ft_raster_flag_clip    :: This flag is only used in direct         */  /*                              rendering mode.  If set, the output will */  /*                              be clipped to a box specified in the     */  /*                              "clip_box" field of the FT_Raster_Params */  /*                              structure.                               */  /*                                                                       */  /*                              Note that by default, the glyph bitmap   */  /*                              is clipped to the target pixmap, except  */  /*                              in direct rendering mode where all spans */  /*                              are generated if no clipping box is set. */  /*                                                                       */  typedef  enum  {    ft_raster_flag_default = 0,    ft_raster_flag_aa      = 1,    ft_raster_flag_direct  = 2,    ft_raster_flag_clip    = 4  } FT_Raster_Flag;  /*************************************************************************/  /*                                                                       */  /* <Struct>                                                              */  /*    FT_Raster_Params                                                   */  /*                                                                       */  /* <Description>                                                         */  /*    A structure to hold the arguments used by a raster's render        */  /*    function.                                                          */  /*                                                                       */  /* <Fields>                                                              */  /*    target      :: The target bitmap.                                  */  /*                                                                       */  /*    source      :: A pointer to the source glyph image (e.g. an        */  /*                   FT_Outline).                                        */  /*                                                                       */  /*    flags       :: The rendering flags.                                */  /*                                                                       */  /*    gray_spans  :: The gray span drawing callback.                     */  /*                                                                       */  /*    black_spans :: The black span drawing callback.                    */  /*                                                                       */  /*    bit_test    :: The bit test callback.                              */  /*                                                                       */  /*    bit_set     :: The bit set callback.                               */  /*                                                                       */  /*    user        :: User-supplied data that is passed to each drawing   */  /*                   callback.                                           */  /*                                                                       */  /*    clip_box    :: An optional clipping box.  It is only used in       */  /*                   direct rendering mode.  Note that coordinates here  */  /*                   should be expressed in _integer_ pixels (and not in */  /*                   26.6 fixed-point units).                            */  /*                                                                       */  /* <Note>                                                                */  /*    An anti-aliased glyph bitmap is drawn if the ft_raster_flag_aa bit */  /*    flag is set in the `flags' field, otherwise a monochrome bitmap    */  /*    will be generated.                                                 */  /*                                                                       */  /*    If the ft_raster_flag_direct bit flag is set in `flags', the       */  /*    raster will call the `gray_spans' callback to draw gray pixel      */  /*    spans, in the case of an aa glyph bitmap, it will call             */  /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */  /*    monochrome bitmap.  This allows direct composition over a          */  /*    pre-existing bitmap through user-provided callbacks to perform the */  /*    span drawing/composition.                                          */  /*                                                                       */  /*    Note that the `bit_test' and `bit_set' callbacks are required when */  /*    rendering a monochrome bitmap, as they are crucial to implement    */  /*    correct drop-out control as defined in the TrueType specification. */  /*                                                                       */  typedef struct  FT_Raster_Params_  {    FT_Bitmap*              target;    void*                   source;    int                     flags;    FT_Raster_Span_Func     gray_spans;    FT_Raster_Span_Func     black_spans;    FT_Raster_BitTest_Func  bit_test;    FT_Raster_BitSet_Func   bit_set;    void*                   user;    FT_BBox                 clip_box;  } FT_Raster_Params;  /*************************************************************************/  /*                                                                       */  /* <FuncType>                                                            */  /*    FT_Raster_New_Func                                                 */  /*                                                                       */  /* <Description>                                                         */  /*    A function used to create a new raster object.                     */  /*                                                                       */  /* <Input>                                                               */  /*    memory :: A handle to the memory allocator.                        */  /*                                                                       */  /* <Output>                                                              */  /*    raster :: A handle to the new raster object.                       */  /*                                                                       */  /* <Return>                                                              */  /*    Error code.  0 means success.                                      */  /*                                                                       */  /* <Note>                                                                */  /*    The `memory' parameter is a typeless pointer in order to avoid     */  /*    un-wanted dependencies on the rest of the FreeType code.  In       */  /*    practice, it is a FT_Memory, i.e., a handle to the standard        */  /*    FreeType memory allocator.  However, this field can be completely  */  /*    ignored by a given raster implementation.                          */  /*                                                                       */  typedef int  (*FT_Raster_New_Func)( void*       memory,                         FT_Raster*  raster );  /*************************************************************************/  /*                                                                       */  /* <FuncType>                                                            */  /*    FT_Raster_Done_Func                                                */  /*                                                                       */  /* <Description>                                                         */  /*    A function used to destroy a given raster object.                  */  /*                                                                       */  /* <Input>                                                               */  /*    raster :: A handle to the raster object.                           */  /*                                                                       */  typedef void  (*FT_Raster_Done_Func)( FT_Raster  raster );  /*************************************************************************/  /*                                                                       */  /* <FuncType>                                                            */  /*    FT_Raster_Reset_Func                                               */  /*                                                                       */  /* <Description>                                                         */  /*    FreeType provides an area of memory called the `render pool',      */  /*    available to all registered rasters.  This pool can be freely used */  /*    during a given scan-conversion but is shared by all rasters.  Its  */  /*    content is thus transient.                                         */  /*                                                                       */  /*    This function is called each time the render pool changes, or just */  /*    after a new raster object is created.                              */  /*                                                                       */  /* <Input>                                                               */  /*    raster    :: A handle to the new raster object.                    */  /*                                                                       */  /*    pool_base :: The address in memory of the render pool.             */  /*                                                                       */  /*    pool_size :: The size in bytes of the render pool.                 */  /*                                                                       */  /* <Note>                                                                */  /*    Rasters can ignore the render pool and rely on dynamic memory      */  /*    allocation if they want to (a handle to the memory allocator is    */  /*    passed to the raster constructor).  However, this is not           */  /*    recommended for efficiency purposes.                               */  /*                                                                       */  typedef void  (*FT_Raster_Reset_Func)( FT_Raster       raster,                           unsigned char*  pool_base,                           unsigned long   pool_size );  /*************************************************************************/  /*                                                                       */  /* <FuncType>                                                            */  /*    FT_Raster_Set_Mode_Func                                            */  /*                                                                       */  /* <Description>                                                         */  /*    This function is a generic facility to change modes or attributes  */  /*    in a given raster.  This can be used for debugging purposes, or    */  /*    simply to allow implementation-specific `features' in a given      */  /*    raster module.                                                     */  /*                                                                       */  /* <Input>                                                               */  /*    raster :: A handle to the new raster object.                       */  /*                                                                       */  /*    mode   :: A 4-byte tag used to name the mode or property.          */  /*                                                                       */  /*    args   :: A pointer to the new mode/proper

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -