下面的子函数中定义的int size是什么含义啊,有什么用??????
/**********************************************************
写汉字子函数
**********************************************************/
void ChineseChar(uint x,uint y,int size,uint For_color,uint Bk_color ,char c)
{
int e=0,i,j;
int ed;
uint ncols;
uint nrows;
uint nbytes;
uchar *pfont;
uchar *pchar;
uchar *fonttable[]={(uchar *)hz16,(uchar *)hz24 , (uchar *)hz32};
pfont=(uchar *)fonttable;
if(size==0)
{
ncols =16-1;
nrows =16-1;
nbytes =32; //(16*16)/8
}
else
if(size==1)
{
ncols =24-1;
nrows =24-1;
nbytes =72; //(24*24)/8
}
else
if(size==2)
{
ncols =32-1;
nrows =32-1;
nbytes =132; //(32*32)/8
}
pchar=pfont + (nbytes*(c-1));
Address_set(x, y, x+nrows,y+ncols);
for(i=0;i<nbytes;i++)
{
ed=*pchar++;
if(size==0)
{
if(i%2==0)
e=8;
else
e=4;
}
else
e=8;
for(j=0;j<e;j++)
{// unsigned char temp;
if((ed>>j)&0x01)
{
//temp = For_color&0x00ff
LCD_Write_DATA(For_color>>8 , For_color ); //textcolor
}
else
{
LCD_Write_DATA( Bk_color>>8 , Bk_color); //backcolor
}
}
}
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
恩恩~非常感谢您~
一周热门 更多>