欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
求大神幫忙,這是一個漢字的顯示程序,怎么能顯示多個漢字?
[打印本頁]
作者:
尛╄→_峰
時間:
2013-10-18 10:54
標題:
求大神幫忙,這是一個漢字的顯示程序,怎么能顯示多個漢字?
/********************************************************************
* 名稱 : PutGB1616()
* 功能 : 在x,y位置寫16*16點陣的漢字
* 輸入 : unsigned short x, unsigned short y, unsigned char c[2], unsigned int fColor,unsigned int bColor
* x列 y行 漢字字符 前景色 背景色
* 輸出 : 無
***********************************************************************/
void LCD_PutGB1616(unsigned short x, unsigned short y, unsigned char c[2], unsigned int fColor,unsigned int bColor)
{
unsigned int i,j,k;
LCD_SetArea(x, x+16-1,y, y+16-1);
for (k=0;k<110;k++)
{ //110表示自建漢字庫中的個數,循環查詢內碼
if ((codeGB_16[k].Index[0]==c[0])&&(codeGB_16[k].Index[1]==c[1]))
{
for(i=0;i<32;i++)
{
unsigned short m=codeGB_16[k].Msk[i];
for(j=0;j<8;j++)
{
if((m&0x80)==0x80)
{
LCD_Write_Data_U16(fColor);
}
else
{
LCD_Write_Data_U16(bColor);
}
m<<=1;
}
}
}
}
}
以上是顯示一個漢字的程序,可是我想顯示多個漢字(如 LCD_PutGB1616_data(x,y,"多個漢字",fColor,bColor)),該怎么寫這個LCD_PutGB1616_data()函數?
作者:
admin
時間:
2013-10-18 13:13
什么屏幕?
作者:
尛╄→_峰
時間:
2013-10-18 15:43
admin 發表于 2013-10-18 13:13
什么屏幕?
宇順lcd 220*176 ,單個漢字已經可以顯示了,就是想寫一個能顯示多個漢字的函數,好方便調用。
作者:
尛╄→_峰
時間:
2013-10-22 15:09
自己已解決!!!!!
void LCD_PutGB1616_data(unsigned short x, unsigned short y, unsigned char *hz, unsigned int fColor,unsigned int bColor)
{
unsigned char c[2];
unsigned char *p = hz;
while(*p)
{
memcpy(c,p,2);
LCD_PutGB1616(x,y,c,fColor,bColor);
p = p+2;
x = x+16;
}
}
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1