打印

这个函数应该怎么改啊

[复制链接]
1798|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
huangfeng33|  楼主 | 2013-7-27 18:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
const unsigned int asc2_3216[95][64]={
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,},/*" ",0*/{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF0,0x00,0xC0,0x07,0xFF,
0xE1,0xE0,0x07,0xF0,0x01,0xE0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,},/*"!",1*/{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x01,0xC0,0x00,
0x00,0x07,0x80,0x00,0x00,0x1F,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x1C,0x20,
0x00,0x00,0x01,0xC0,0x00,0x00,0x07,0x80,0x00,0x00,0x1F,0x00,0x00,0x00,0x1E,
0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,},/*""",2*/{
0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0x00,0x00,0x18,0x0C,0x00,0x00,0x18,0x0F,
0xE0,0x00,0x1F,0xFC,0x00,0x03,0xF8,0x0C,0x00,0x00,0x18,0x0C,0x00,0x00,0x18,
0x0C,0x00,0x00,0x18,0x0C,0x00,0x00,0x18,0x0C,0x00,0x00,0x18,0x0F,0xE0,0x00,
0x1F,0xFC,0x00,0x03,0xF8,0x0C,0x00,0x00,0x18,0x0C,0x00,0x00,0x18,0x0C,0x00,
0x00,0x00,0x00,0x00,},/*"#",3*/{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,0x78,0x07,
0xC0,0x00,0xFC,0x06,0x40,0x01,0x0E,0x00,0x20,0x03,0x07,0x00,0x20,0x02,0x03,
0x80,0x20,0x0F,0xFF,0xFF,0xFC,0x02,0x01,0xC0,0x20,0x02,0x00,0xE0,0x60,0x01,
0x30,0x70,0x40,0x01,0xF0,0x3F,0x80,0x00,0xF0,0x1F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,},/*"$",4*/{
0x00,0xFE,0x00,0x00,0x01,0xFF,0x00,0x00,0x03,0x01,0x80,0x00,0x02,0x00,0x80,
0x60,0x03,0x01,0x81,0xC0,0x01,0xFF,0x07,0x00,0x00,0xFE,0x18,0x00,0x00,0x00,
0xE0,0x00,0x00,0x03,0xBF,0x00,0x00,0x0C,0xFF,0xC0,0x00,0x71,0x80,0x60,0x01,
0xC1,0x00,0x20,0x03,0x01,0x80,0x60,0x00,0x00,0xFF,0xC0,0x00,0x00,0x3F,0x00,
0x00,0x00,0x00,0x00,},/*"%",5*/{

定义了一个这样的asiic码数组  void ILI93xx_ShowxNum(5,5,5,1,32,0)  这样调用只显示一半的字符 void ILI93xx_ShowxNum(5,5,5,1,64,0) 这样调用上下显示两个相同的字符
//在指定位置显示一个字符
//x,y:起始坐标
//num:要显示的字符:" "--->"~"
//size:字体大小 12/16
//mode:叠加方式(1)还是非叠加方式(0)
void ILI93xx_ShowChar(u16 x,u16 y,u8 num,u8 size,u8 mode)  //10,10,'M',64,0
{            
    u16 temp,t,t1;
u16 y0=y;
u16 colortemp=POINT_COLOR;                   
//设置窗口            
num=num-' ';//得到偏移后的值
if(!mode) //非叠加方式
{
    for(t=0;t<size;t++)
    {   
if(size==16)
temp=asc2_1608[num][t];          //调用1206字体
else
temp=asc2_3216[num][t];       
          
for(t1=0;t1<8;t1++)
{             
        if(temp&0x80)
    POINT_COLOR=colortemp;
else
    POINT_COLOR=BACK_COLOR;
ILI93xx_DrawPoint(x,y);       
temp<<=1;
y++;
if(x>=ILI93xxdev.width){POINT_COLOR=colortemp;return;}//超区域了
if((y-y0)==size)
{
  y=y0;
  x++;
  if(x>=ILI93xxdev.width)        {POINT_COLOR=colortemp;return;}//超区域了       
  break;       
}
            }          

    }   
}
请问这个函数应该怎么改啊?
沙发
haibian826| | 2013-7-27 18:34 | 只看该作者
没看懂  你想怎么改?想实现什么效果?

使用特权

评论回复
板凳
jxmzzr| | 2013-7-28 20:57 | 只看该作者
初学者帮不上忙,只能帮顶一下,希望 有朋友能帮助你.

使用特权

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

本版积分规则

506

主题

2446

帖子

8

粉丝