Hi guys,
I've played a little with the code and found that we can't use text functions together with graphics - the text goes directly to the LCD than the graphic gets into the buffer first and than whole buffer transferred to display.
So I added functions DrawString and DrawChar that draw string into buffer first, so it can be combined with graphics and shown by calling Lcd.Refresh() function:
public void DrawString(int x, int line, string str, bool mode) { foreach (char c in str) { DrawCharacter(x, line, c,mode); x += 5; // 6 pixels wide if (x + 5 >= 84) { x = 0; // ran out of this line line++; } if (line >= 48 / 8) { return; // ran out of space :( } } } protected void DrawCharacter(int x, int line, char c, bool mode) { for (int i = 0; i < 5; i++) { if (mode) ByteMap[x + (line * 84)+ i] |= NokiaCharacters.ASCII[c - 0x20][i]; else ByteMap[x + (line * 84) + i] |=(byte) ~NokiaCharacters.ASCII[c - 0x20][i]; //x++; } }
Regards,
Eugene
Nice Eugene! You're welcome to re-post the code with that added in.