xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 4KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-21
  • 語言: 其他
  • 標(biāo)簽: STM32??UC/GUI??片外FLASH??

資源簡介

現(xiàn)在的UC/GUI的源程序只能實現(xiàn)部分英文字庫,但我們中國人開發(fā)項目常常要用中國字,網(wǎng)上關(guān)于實現(xiàn)漢字的方法的文章太多了,隨便可以找到,但是那都是將少量的字庫文件存放在片內(nèi)的FLASH,一旦在不確定漢字使用范圍的時候那就麻煩了,要將整個字庫文件編進(jìn)去的話那個頭就太大了,因此只能外加片外FLASH了,這樣就要修改UC/GUI的源碼了。

資源截圖

代碼片段和文件信息

/*
*********************************************************************************************************
*????????????????????????????????????????????????uC/GUI
*????????????????????????Universal?graphic?software?for?embedded?applications
*
*???????????????????????(c)?Copyright?2002?Micrium?Inc.?Weston?FL
*???????????????????????(c)?Copyright?2002?SEGGER?Microcontroller?Systeme?GmbH
*
*??????????????礐/GUI?is?protected?by?international?copyright?laws.?Knowledge?of?the
*??????????????source?code?may?not?be?used?to?write?a?similar?product.?This?file?may
*??????????????only?be?used?in?accordance?with?a?license?and?should?not?be?redistributed
*??????????????in?any?way.?We?appreciate?your?understanding?and?fairness.
*
----------------------------------------------------------------------
File????????:?GUICharP.C
Purpose?????:?Implementation?of?Proportional?fonts
---------------------------END-OF-HEADER------------------------------
*/

#include????????????/*?needed?for?definition?of?NULL?*/
#include?“GUI_Private.h“
?
/*********************************************************************
*
*???????Static?code

*
**********************************************************************
*/
//字模數(shù)據(jù)的暫存數(shù)組以單個字模的最大字節(jié)數(shù)為設(shè)定值?
#define?BYTES_PER_FONT?64?
static?U8?GUI_FontDataBuf[BYTES_PER_FONT];

/*********************************************************************
*
*???????GUIPROP_FindChar
*/
static?const?GUI_FONT_PROP?GUI_UNI_PTR?*?GUIPROP_FindChar(const?GUI_FONT_PROP?GUI_UNI_PTR*?pProp?U16P?c)?{
??for?(;?pProp;?pProp?=?pProp->pNext)?{
????if?((c>=pProp->First)?&&?(c<=pProp->Last))
??????break;
??}
??return?pProp;
}

/*********************************************************************
*
*???????Public?code
*
**********************************************************************
*/
/*********************************************************************
*
*???????GUIPROP_DispChar
*
*?Purpose:
*???This?is?the?routine?that?displays?a?character.?It?is?used?by?all
*???other?routines?which?display?characters?as?a?subroutine.
*/
void?GUIPROP_DispChar(U16P?c)?{
??int?BytesPerLine;
U8?BytesPerFont;?
U32?baseoft;?

??GUI_DRAWMODE?DrawMode?=?GUI_Context.TextMode;
??const?GUI_FONT_PROP?GUI_UNI_PTR?*?pProp?=?GUIPROP_FindChar(GUI_Context.pAFont->p.pProp?c);
??if?(pProp)?{
????GUI_DRAWMODE?OldDrawMode;
const?GUI_CHARINFO?GUI_UNI_PTR?*?pCharInfo;
if(GUI_Context.pAFont?==?&GUI_FontHZ_SimHei_20)
{
pCharInfo?=?pProp->paCharInfo;

base?=?(U32)pProp->paCharInfo->pData;
???? BytesPerFont?=?GUI_Context.pAFont->YSize?*?pProp->paCharInfo->BytesPerLine;?//每個字模的數(shù)據(jù)字節(jié)數(shù)?
???? if?(BytesPerFont?>?BYTES_PER_FONT)
???? {
???? BytesPerFont?=?BYTES_PER_FONT;
???? }?
???? if?(c????? {?
???? oft?=?base?+?(c?-?0x20)?*?BytesPerFont;?
???? }
???? else?//中文字符地址偏移算法?
???? {
???? if((c>>8)?>=?0xb0)
oft?=?base?+?(((c>>8)?-?0xa1?-?6)?*?94?+?((c&0xff)?-?0xa1))?*?B

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????17899??2010-12-26?17:16??SimHei_20.c

?????文件???????5889??2010-12-27?09:54??GUICharP.c

?????文件????????239??2010-12-31?10:28??readme.txt

-----------?---------??----------?-----??----

????????????????24027????????????????????3


評論

共有 條評論