打印

显示大字体,

[复制链接]
214|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
追光少年|  楼主 | 2018-7-30 11:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[mw_shl_code=c,true]void Show_FontX(u16 x,u16 y,u8 *font,u8 size,u8 mode)
{
        u8 temp1,temp2;
        u16 temp,t,t1,k;
        u16 y0=y;
  
        u16 csize=(size/8+((size%8)?1:0))*(size);//得到字体一个字符对应点阵集所占的字节数         
                        temp1 = *font++;
                  temp2 = *font++;
               
                for(k=0;k<20;k++)
                        {
                        if (temp1 == Fontlib[k].Index[0] && temp2 == Fontlib[k].Index[1])
                                {                                                                                                     
                                        for(t=0;t<csize;t++)
                                                {
                                                temp = Fontlib[k].Msk[t];
                                                        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((y-y0)==size)
                                                                {
                                                                        y=y0;
                                                                        x++;
                                                                        break;
                                                                }
                                                        }           
                                                }
                                }
                        }
}
       
[/mw_shl_code]

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

379

主题

379

帖子

0

粉丝