更多操作
创建页面,内容为“*'''24x48英文字体取模说明''' :尺寸设置如下图所示: :750px :取模数据如下(点击打开): ::[http://www.lcdwiki.c…” |
无编辑摘要 |
||
第1行: | 第1行: | ||
*''' | *'''32x64英文字体取模说明''' | ||
:尺寸设置如下图所示: | :尺寸设置如下图所示: | ||
:[[File:Module- | :[[File:Module-020.png|750px]] | ||
:取模数据如下(点击打开): | :取模数据如下(点击打开): | ||
::[http://www.lcdwiki.com/res/PublicFile/ | ::[http://www.lcdwiki.com/res/PublicFile/32x64_ASCII_data.txt '''32x64英文ASCII取模数据'''] | ||
:函数定义如下: | :函数定义如下: | ||
第15行: | 第15行: | ||
//num:想要显示的字符,格式如字符A则输入:'A'; | //num:想要显示的字符,格式如字符A则输入:'A'; | ||
//mode:参数值0代表非叠加显示方式,参数1代表叠加显示方式; | //mode:参数值0代表非叠加显示方式,参数1代表叠加显示方式; | ||
void | void LCD_Show_6432_char(u16 x,u16 y,u16 fc, u16 bc, u8 num,u8 mode) | ||
{ | { | ||
u32 temp; | u32 temp; | ||
第21行: | 第21行: | ||
u16 colortemp=POINT_COLOR; | u16 colortemp=POINT_COLOR; | ||
num=num-' ';//得到偏移后的值 | num=num-' ';//得到偏移后的值 | ||
LCD_SetWindows(x,y,x+ | LCD_SetWindows(x,y,x+32-1,y+64-1);//设置单个文字显示窗口 | ||
if(!mode) //非叠加方式:字体带有背景色,显示时会将原来显示的内容覆盖掉 | if(!mode) //非叠加方式:字体带有背景色,显示时会将原来显示的内容覆盖掉 | ||
{ | { | ||
for(pos=0;pos< | for(pos=0;pos<64;pos++) | ||
{ | { | ||
temp = ( | temp = (asc2_6432[num][pos*4]<<24)|(asc2_6432[num][pos*4+1]<<16)|(asc2_6432[num][pos*4+2]<<8)|asc2_6432[num][pos*4+3];//调用6432字体,需要自己取模定义 | ||
for(t=0;t< | for(t=0;t<32;t++) | ||
{ | { | ||
if(temp& | if(temp&0x80000000) | ||
{ | { | ||
Lcd_WriteData_16Bit(fc); | Lcd_WriteData_16Bit(fc); | ||
第44行: | 第44行: | ||
else//叠加方式:字体不带背景色,直接叠加显示到原来显示的内容上 | else//叠加方式:字体不带背景色,直接叠加显示到原来显示的内容上 | ||
{ | { | ||
for(pos=0;pos< | for(pos=0;pos<64;pos++) | ||
{ | { | ||
temp = ( | temp = (asc2_6432[num][pos*4]<<24)|(asc2_6432[num][pos*4+1]<<16)|(asc2_6432[num][pos*4+2]<<8)|asc2_6432[num][pos*4+3];//调用6432字体,需要自己取模定义 | ||
for(t=0;t< | for(t=0;t<32;t++) | ||
{ | { | ||
POINT_COLOR=fc; | POINT_COLOR=fc; | ||
if(temp& | if(temp&0x80000000) | ||
{ | { | ||
LCD_DrawPoint(x+t,y+pos);//画一个点 | LCD_DrawPoint(x+t,y+pos);//画一个点 |