📄 ftcimage.h
字号:
/***************************************************************************//* *//* ftcimage.h *//* *//* FreeType Image cache (specification). *//* *//* Copyright 2000-2001 by *//* David Turner, Robert Wilhelm, and Werner Lemberg. *//* *//* This file is part of the FreeType project, and may only be used, *//* modified, and distributed under the terms of the FreeType project *//* license, LICENSE.TXT. By continuing to use, modify, or distribute *//* this file you indicate that you have read the license and *//* understand and accept it fully. *//* *//***************************************************************************/ /*************************************************************************/ /* */ /* Each image cache really manages FT_Glyph objects. */ /* */ /*************************************************************************/#ifndef __FTCIMAGE_H__#define __FTCIMAGE_H__#include <ft2build.h>#include FT_CACHE_HFT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* cache_subsystem */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /***** *****/ /***** IMAGE CACHE OBJECT *****/ /***** *****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/#define FTC_IMAGE_FORMAT( x ) ( (x) & 7 )#define ftc_image_format_bitmap 0x0000#define ftc_image_format_outline 0x0001#define ftc_image_format_mask 0x000F#define ftc_image_flag_monochrome 0x0010#define ftc_image_flag_unhinted 0x0020#define ftc_image_flag_autohinted 0x0040#define ftc_image_flag_unscaled 0x0080#define ftc_image_flag_no_sbits 0x0100 /* monochrome bitmap */#define ftc_image_mono ftc_image_format_bitmap | \ ftc_image_flag_monochrome /* anti-aliased bitmap */#define ftc_image_grays ftc_image_format_bitmap /* scaled outline */#define ftc_image_outline ftc_image_format_outline /*************************************************************************/ /* */ /* <Struct> */ /* FTC_ImageDesc */ /* */ /* <Description> */ /* A simple structure used to describe a given glyph image category. */ /* Note that this is different from @FTC_Image_Desc. */ /* */ /* <Fields> */ /* size :: An @FTC_SizeRec used to describe the glyph's face and */ /* size. */ /* */ /* type :: The glyph image's type. Note that it is a 32-bit uint. */ /* */ /* <Note> */ /* This type deprecates @FTC_Image_Desc. */ /* */ typedef struct FTC_ImageDesc_ { FTC_FontRec font; FT_UInt32 type; } FTC_ImageDesc; /* */#define FTC_IMAGE_DESC_COMPARE( d1, d2 ) \ ( FTC_FONT_COMPARE( &(d1)->font, &(d2)->font ) && \ (d1)->type == (d2)->type )#define FTC_IMAGE_DESC_HASH( d ) \ (FT_UFast)( FTC_FONT_HASH( &(d)->font ) ^ \ ( (d)->type << 4 ) ) /*************************************************************************/ /* */ /* <Type> */ /* FTC_ImageCache */ /* */ /* <Description> */ /* A handle to an glyph image cache object. They are designed to */ /* hold many distinct glyph images while not exceeding a certain */ /* memory threshold. */ /* */ typedef struct FTC_ImageCacheRec_* FTC_ImageCache; /*************************************************************************/ /* */ /* <Function> */ /* FTC_ImageCache_New */ /* */ /* <Description> */ /* Creates a new glyph image cache. */ /* */ /* <Input> */ /* manager :: The parent manager for the image cache. */ /* */ /* <Output> */ /* acache :: A handle to the new glyph image cache object. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ FT_EXPORT( FT_Error ) FTC_ImageCache_New( FTC_Manager manager, FTC_ImageCache *acache ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_ImageCache_Lookup */ /* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -