Example #1
0
//-------------------------------------------------------------------------------------------------
//
// Displays bitmap from program memory
//
//-------------------------------------------------------------------------------------------------
void GLCD_Bitmap(unsigned char * bitmap, unsigned char x, unsigned char y, unsigned char width, unsigned char height)
{
unsigned char i, j;

for(j = 0; j < height; j++)
{
GLCD_GraphicGoTo(x, y + j);
for(i = 0; i < width/GLCD_FONT_WIDTH; i++)
  {
  GLCD_WriteDisplayData(pgm_read_byte(bitmap + i + (GLCD_GRAPHIC_AREA * j))); 	
  }
}
}
void drawAChar(uint16_t x, int y, int width, int height, unsigned int offset, const unsigned char *fontBitmap)
{
	int pos = offset;
	unsigned char data;
	for(int i = 0; i < height-1 ; i++)
	{
		GLCD_GraphicGoTo(x, y+i);
		GLCD_WriteCommand(SED1335_MWRITE);
		for(int j = 0; j < width/8 ; j++)
		{
			data = pgm_read_byte(&fontBitmap[pos]);
			GLCD_WriteData(data);
			pos++;	
		}
	}
}