结构体GUI_CHARINFO_EXT定义了字符扩展信息,作为GUI_GETCHARINFO函数指针所指向的函数参数。 typedefstruct { U8XSize; U8YSize; I8XPos; I8YPos; U8XDist; constunsigned char * pData; } GUI_CHARINFO_EXT;结构体tGUI_ENC_APIList定义了该字体字符串操作函数指针。
我们看下我们汉字字体的定义: 1GUI_CONST_STORAGE GUI_CHARINFO GUI_FontHZ24_CharInfo[2] =2{3{12,12,2, (void*)"0:/SYSTEM/FONT/ASC12x24.bin"},4{24,24,3, (void*)"0:/SYSTEM/FONT/HZ24x24.bin"},5};6GUI_CONST_STORAGE GUI_FONT_PROP GUI_FontHZ24_PropHZ={70xA1A1,80xFEFE,9&GUI...
这些函数的原型如下(include/gdi.h): 453intGUIAPIGetMapMode(HDC hdc);454voidGUIAPIGetViewportExt(HDC hdc, POINT* pPt);455voidGUIAPIGetViewportOrg(HDC hdc, POINT* pPt);456voidGUIAPIGetWindowExt(HDC hdc, POINT* pPt);457voidGUIAPIGetWindowOrg(HDC hdc, POINT* pPt);458voidGUIAPISetMapMode(HDC hdc...
15 const GUI_FONT_PROP GUI_UNI_PTR * pProp; 16 const GUI_FONT_PROP_EXT GUI_UNI_PTR * pPropExt; 17 } p; 18 U8 Baseline; 19 U8 LHeight; /* Height of a small lower case character (a,x) */ 20 U8 CHeight; /* Height of a small upper case character (A,X) */ 21 }; 1....
中。字体声明伪代码如下: unsigned char ExtFontBuf [FontBufSize] = {…}; GUI_CHARINFO ExChInfo = {13, 13, 2, ExtFontBuf}; GUI_FONT_PROP GUI_FontExt_prop = {0xa1a1, 0xf7fe, ExChInfo, 0}; GUI_FONT GUI_FontExt = {GUI_FONTTYPE_PROPEXT; 12, 12, 1, 1, GUI_FontExt_prop…};...