初级会员

- 积分
- 77
- 金钱
- 77
- 注册时间
- 2015-3-13
- 在线时间
- 3 小时
|
5金钱
现在屏幕可以显示 12 16 及24大小字体 现在想显示32的字体
字库已经做好
函数不会修改,请各位老师帮忙修改一份谢谢
下面的函数可以显示12 16 24字体
void LCD_ShowChar(u16 x,u16 y,u8 num,u8 size,u8 mode)
{
u8 temp,t1,t;
u16 y0=y;
u8 csize=(size/8+((size%8)?1:0))*(size/2);
num=num-' ';
for(t=0;t<csize;t++)
{
if(size==12)temp=asc2_1206[num][t];
else if(size==16)temp=asc2_1608[num][t];
else if(size==24)temp=asc2_2412[num][t];
else return;
for(t1=0;t1<8;t1++)
{
if(temp&0x80)LCD_Fast_DrawPoint(x,y,POINT_COLOR);
else if(mode==0)LCD_Fast_DrawPoint(x,y,BACK_COLOR);
temp<<=1;
y++;
if(x>=lcddev.width)return;
if((y-y0)==size)
{
y=y0;
x++;
if(x>=lcddev.width)return;
break;
}
}
}
}
|
最佳答案
查看完整内容[请看2#楼]
不懂没关系.
要学会找资料,想要成为程序员,不会找资料,那可是不行的.
论坛大把帖子. 教你如何搞字库,多看看.
别想着别人会给你写代码,这么想就错了.
http://www.openedv.com/posts/list/40508.htm
|