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

📄 ftcache.h

📁 qt-x11-opensource-src-4.1.4.tar.gz源码
💻 H
📖 第 1 页 / 共 4 页
字号:
  /*                                                                       */  /*    type   :: A pointer to a glyph image type descriptor.              */  /*                                                                       */  /*    gindex :: The glyph index to retrieve.                             */  /*                                                                       */  /* <Output>                                                              */  /*    aglyph :: The corresponding @FT_Glyph object.  0 in case of        */  /*              failure.                                                 */  /*                                                                       */  /*    anode  :: Used to return the address of of the corresponding cache */  /*              node after incrementing its reference count (see note    */  /*              below).                                                  */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  /* <Note>                                                                */  /*    The returned glyph is owned and managed by the glyph image cache.  */  /*    Never try to transform or discard it manually!  You can however    */  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */  /*                                                                       */  /*    If `anode' is _not_ NULL, it receives the address of the cache     */  /*    node containing the glyph image, after increasing its reference    */  /*    count.  This ensures that the node (as well as the FT_Glyph) will  */  /*    always be kept in the cache until you call @FTC_Node_Unref to      */  /*    `release' it.                                                      */  /*                                                                       */  /*    If `anode' is NULL, the cache node is left unchanged, which means  */  /*    that the FT_Glyph could be flushed out of the cache on the next    */  /*    call to one of the caching sub-system APIs.  Don't assume that it  */  /*    is persistent!                                                     */  /*                                                                       */  FT_EXPORT( FT_Error )  FTC_ImageCache_Lookup( FTC_ImageCache  cache,                         FTC_ImageType   type,                         FT_UInt         gindex,                         FT_Glyph       *aglyph,                         FTC_Node       *anode );  /*************************************************************************/  /*                                                                       */  /* <Type>                                                                */  /*    FTC_SBit                                                           */  /*                                                                       */  /* <Description>                                                         */  /*    A handle to a small bitmap descriptor.  See the @FTC_SBitRec       */  /*    structure for details.                                             */  /*                                                                       */  typedef struct FTC_SBitRec_*  FTC_SBit;  /*************************************************************************/  /*                                                                       */  /* <Struct>                                                              */  /*    FTC_SBitRec                                                        */  /*                                                                       */  /* <Description>                                                         */  /*    A very compact structure used to describe a small glyph bitmap.    */  /*                                                                       */  /* <Fields>                                                              */  /*    width     :: The bitmap width in pixels.                           */  /*                                                                       */  /*    height    :: The bitmap height in pixels.                          */  /*                                                                       */  /*    left      :: The horizontal distance from the pen position to the  */  /*                 left bitmap border (a.k.a. `left side bearing', or    */  /*                 `lsb').                                               */  /*                                                                       */  /*    top       :: The vertical distance from the pen position (on the   */  /*                 baseline) to the upper bitmap border (a.k.a. `top     */  /*                 side bearing').  The distance is positive for upwards */  /*                 Y coordinates.                                        */  /*                                                                       */  /*    format    :: The format of the glyph bitmap (monochrome or gray).  */  /*                                                                       */  /*    max_grays :: Maximum gray level value (in the range 1 to 255).     */  /*                                                                       */  /*    pitch     :: The number of bytes per bitmap line.  May be positive */  /*                 or negative.                                          */  /*                                                                       */  /*    xadvance  :: The horizontal advance width in pixels.               */  /*                                                                       */  /*    yadvance  :: The vertical advance height in pixels.                */  /*                                                                       */  /*    buffer    :: A pointer to the bitmap pixels.                       */  /*                                                                       */  typedef struct  FTC_SBitRec_  {    FT_Byte   width;    FT_Byte   height;    FT_Char   left;    FT_Char   top;    FT_Byte   format;    FT_Byte   max_grays;    FT_Short  pitch;    FT_Char   xadvance;    FT_Char   yadvance;    FT_Byte*  buffer;  } FTC_SBitRec;  /*************************************************************************/  /*                                                                       */  /* <Type>                                                                */  /*    FTC_SBitCache                                                      */  /*                                                                       */  /* <Description>                                                         */  /*    A handle to a small bitmap cache.  These are special cache objects */  /*    used to store small glyph bitmaps (and anti-aliased pixmaps) in a  */  /*    much more efficient way than the traditional glyph image cache     */  /*    implemented by @FTC_ImageCache.                                    */  /*                                                                       */  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FTC_SBitCache_New                                                  */  /*                                                                       */  /* <Description>                                                         */  /*    Creates a new cache to store small glyph bitmaps.                  */  /*                                                                       */  /* <Input>                                                               */  /*    manager :: A handle to the source cache manager.                   */  /*                                                                       */  /* <Output>                                                              */  /*    acache  :: A handle to the new sbit cache.  NULL in case of error. */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  FT_EXPORT( FT_Error )  FTC_SBitCache_New( FTC_Manager     manager,                     FTC_SBitCache  *acache );  /*************************************************************************/  /*                                                                       */  /* <Function>                                                            */  /*    FTC_SBitCache_Lookup                                               */  /*                                                                       */  /* <Description>                                                         */  /*    Looks up a given small glyph bitmap in a given sbit cache and      */  /*    `lock' it to prevent its flushing from the cache until needed.     */  /*                                                                       */  /* <Input>                                                               */  /*    cache  :: A handle to the source sbit cache.                       */  /*                                                                       */  /*    type   :: A pointer to the glyph image type descriptor.            */  /*                                                                       */  /*    gindex :: The glyph index.                                         */  /*                                                                       */  /* <Output>                                                              */  /*    sbit   :: A handle to a small bitmap descriptor.                   */  /*                                                                       */  /*    anode  :: Used to return the address of of the corresponding cache */  /*              node after incrementing its reference count (see note    */  /*              below).                                                  */  /*                                                                       */  /* <Return>                                                              */  /*    FreeType error code.  0 means success.                             */  /*                                                                       */  /* <Note>                                                                */  /*    The small bitmap descriptor and its bit buffer are owned by the    */  /*    cache and should never be freed by the application.  They might    */  /*    as well disappear from memory on the next cache lookup, so don't   */  /*    treat them as persistent data.                                     */  /*                                                                       */  /*    The descriptor's `buffer' field is set to 0 to indicate a missing  */  /*    glyph bitmap.                                                      */  /*                                                                       */  /*    If `anode' is _not_ NULL, it receives the address of the cache     */  /*    node containing the bitmap, after increasing its reference count.  */  /*    This ensures that the node (as well as the image) will always be   */  /*    kept in the cache until you call @FTC_Node_Unref to `release' it.  */  /*                                                                       */  /*    If `anode' is NULL, the cache node is left unchanged, which means  */  /*    that the bitmap could be flushed out of the cache on the next      */  /*    call to one of the caching sub-system APIs.  Don't assume that it  */  /*    is persistent!                                                     */  /*                                                                       */  FT_EXPORT( FT_Error )  FTC_SBitCache_Lookup( FTC_SBitCache    cache,                        FTC_ImageType    type,                        FT_UInt          gindex,                        FTC_SBit        *sbit,                        FTC_Node        *anode ); /* */FT_END_HEADER#endif /* __FTCACHE_H__ *//* END */

⌨️ 快捷键说明

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