unicode点阵字模生成工具生成32*32字库在bootloader中显示的代码
来源:互联网 发布:php 权限拦截器 编辑:程序博客网 时间:2024/04/30 01:52
2012-05-09测试以下代码及工具可用,故记录下来。代码如下:
static void PutPixel(unsigned int x,unsigned int y, DWORD c )
{
if ( (x < 800) && (y < 480) )
*((unsigned int *)IMAGE_EBOOT_FRAMEBUFFER_UA_START + 800*y + x) = c;
}
static void drawmat(char *mat,int matsize,int x,int y, DWORD color)
/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/
{int i,j,k,n;
n=(matsize-1)/8+1;
for(j=0;j<matsize;j++)
for(i=0;i<n;i++)
for(k=0;k<8;k++)
if(mat[j*n+i]&(0x80>>k)) /*测试为1的位则显示*/
PutPixel(x+i*8+k,y+j,color);
}
static void OEMShowWaitTXT(DWORD LcdType)/* Add by ZMF */
{
#if 1
//系统升级
drawmat((char*)xi16S,16,160-16*2,60,0xffffff);
drawmat((char*)tong16S,16,160-16,60,0xffffff);
drawmat((char*)sheng16S,16,160,60,0xffffff);
drawmat((char*)ji16S,16,160+16,60,0xffffff);
drawmat((char*)sheng32S,32,160+16*2,60,0xffffff);//显示32*32汉字或英文
#else
drawmat((char*)char_dl16S,16,250,350,0xffffff);
drawmat((char*)char_o16S,16,250+8*1+2,350,0xffffff);
drawmat((char*)char_a16S,16,250+8*2+2,350,0xffffff);
drawmat((char*)char_d16S,16,250+8*3+2,350,0xffffff);
drawmat((char*)char_i16S,16,250+8*4,350,0xffffff);
drawmat((char*)char_n16S,16,250+8*5,350,0xffffff);
drawmat((char*)char_g16S,16,250+8*6,350,0xffffff);
drawmat((char*)char_i16S,16,250+8*9,350,0xffffff);
drawmat((char*)char_m16S,16,250+8*10,350,0xffffff);
drawmat((char*)char_a16S,16,250+8*11+1,350,0xffffff);
drawmat((char*)char_g16S,16,250+8*12+1,350,0xffffff);
drawmat((char*)char_e16S,16,250+8*13+1,350,0xffffff);
#endif
RETAILMSG (1, (TEXT("ZMF:%s done.\r\n"), _T(__FUNCTION__)));
}
包含的头文件如下:
char sheng32S[]={
#if 1 // h 32*32字模
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x38,0x00,0x00
,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00
,0x00,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x38,0xF0,0x00,0x00,0x3A,0x38,0x00
,0x00,0x3C,0x1C,0x00,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00
,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00
,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00,0x00,0x38,0x1C,0x00
,0x00,0x38,0x1C,0x00,0x00,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
#else // 三32*32字模
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,0x18,0x00,0x00,0x00,0x3C
,0x0F,0xFF,0xFF,0xFC,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,0x80,0x00,0x00,0x01,0xE0,0x03,0xFF,0xFF,0xF0,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,0x0C
,0x00,0x00,0x00,0x1E,0x3F,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
#endif
};
- unicode点阵字模生成工具生成32*32字库在bootloader中显示的代码
- 点阵字库生成工具
- 通用点阵字库生成工具
- 任意大小汉字点阵字库(字模)的制作与生成 单片机GUI/STemwin
- 在emwin中显示字库芯片GT23L24M0140的字模
- 点阵字模的显示
- 点阵字库生成
- GB2312字库的16x16点阵字模
- 点阵字模生成原理与方法
- js基于html5中canvas的字模提取工具(附js生成声音的方式、获取系统支持字体方式、字模显示及其他)
- 用于嵌入式系统的点阵字库生成(for C51)
- 点阵字库的显示原理
- 点阵字库的显示原理
- 第一天写blog,生成点阵字库
- 点阵字模显示
- 汉字点阵字库的原理与显示
- ASCII码点阵字库的显示
- 汉字点阵字库的原理与显示
- 关于迷途指针
- mmc子系统学习笔记八 详谈如何构造mmc_card设备
- Tomcat学习笔记(一)
- Installing MySQL from a tarball
- 低端手机这个野百合在新技术的推动下也会有春天
- unicode点阵字模生成工具生成32*32字库在bootloader中显示的代码
- java.nio.ByteBuffer 以及flip,clear及rewind区别
- Tika是什么?如何安装Tika?
- 定制Android关机界面
- commons-BeanUtils简介
- 正则表达式 java和js区别
- performace evoluation in tracking object in the video sequence
- 悲悯心洞悉真相
- ByteBuffer的allocate和allocateDirect