ugfx_release_2.6
Tectu 2012-05-31 12:12:11 +02:00
parent 045cc3cac7
commit 976ab0ffd5
1 changed files with 20 additions and 24 deletions

12
glcd.c
View File

@ -257,23 +257,19 @@ void lcdDrawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t charcolor, ui
uint16_t j = 0; uint16_t j = 0;
unsigned char buffer[16]; unsigned char buffer[16];
unsigned char tmp_char=0; unsigned char tmp_char=0;
GetASCIICode(buffer,c); GetASCIICode(buffer,c);
for (i=0;i<16;i++)
{ for (i=0;i<16;i++) {
tmp_char=buffer[i]; tmp_char=buffer[i];
for (j=0;j<8;j++) for (j=0;j<8;j++) {
{
if (((tmp_char >> (7-j)) & 0x01) == 0x01) if (((tmp_char >> (7-j)) & 0x01) == 0x01)
{
lcdDrawPixel(x+j,y+i,charcolor); lcdDrawPixel(x+j,y+i,charcolor);
}
else else
{
lcdDrawPixel(x+j,y+i,bkcolor); lcdDrawPixel(x+j,y+i,bkcolor);
} }
} }
} }
}
void lcdDrawString(uint16_t x, uint16_t y, uint8_t *str, uint16_t color, uint16_t bkcolor) { void lcdDrawString(uint16_t x, uint16_t y, uint8_t *str, uint16_t color, uint16_t bkcolor) {
uint8_t TempChar; uint8_t TempChar;