金牌会员
 
- 积分
- 1067
- 金钱
- 1067
- 注册时间
- 2015-4-13
- 在线时间
- 189 小时
|
发表于 2015-7-27 08:48:58
|
显示全部楼层
我改了下原子的程序,希望可以帮到你,下面是64*64的汉字,自己取模,然后建个数组
mode是0就是带背景色,1就是不带背景色,哦,对了我的屏是480*320的
void LCD_ShowChina64(u16 x,u16 y,u8 num,u8 mode)
{
u16 temp,t1,t;
u16 y0=y;
u16 colortemp=POINT_COLOR;
//设置窗口
if(!mode) //非叠加方式
{
for(t=0;t<512;t++) // 512=64*64/8
{
temp=china64[num][t]; //数组名称
for(t1=0;t1<8;t1++)
{
if(temp&0x80)POINT_COLOR=colortemp;
else  OINT_COLOR=BACK_COLOR;
LCD_DrawPoint(x,y);
temp<<=1;
y++;
if(x>=480){POINT_COLOR=colortemp;return;}//超区域了
if((y-y0)==64)
{
y=y0;
x++;
if(x>=480){POINT_COLOR=colortemp;return;}//超区域了
break;
}
}
}
}else//叠加方式
{
for(t=0;t<512;t++) //同上
{
temp=china64[num][t]; //同上
for(t1=0;t1<8;t1++)
{
if(temp&0x80)LCD_DrawPoint(x,y);
temp<<=1;
y++;
if(x>=480){POINT_COLOR=colortemp;return;}//超区域了
if((y-y0)==64)
{
y=y0;
x++;
if(x>=480){POINT_COLOR=colortemp;return;}//超区域了
break;
}
}
}
}
POINT_COLOR=colortemp;
} |
|