Whoops, the font code uses negative coordinates to draw characters partially

off the screen.
This commit is contained in:
root
2013-08-30 00:53:38 +00:00
parent e4f49abb82
commit 5c69e1d924
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -123,7 +123,7 @@ const uint8_t* font2[] = { 0, 0, 0, 0, 0, 0, letters_97 /*a*/, letters_98
* @param x,y coordinates,
* @param c is 1 or 0 to draw or clear it
*/
uint8_t Font::Draw(unsigned char letter, uint8_t x, uint8_t y, uint8_t c) {
uint8_t Font::Draw(unsigned char letter, int x, int y, uint8_t c) {
uint8_t maxx=0;
uint8_t charCol;
@@ -168,7 +168,7 @@ uint8_t Font::Draw(unsigned char letter, uint8_t x, uint8_t y, uint8_t c) {
* @param x,y coordinates,
* @param c is 1 or 0 to draw or clear it
*/
uint8_t Font::Draw90(unsigned char letter, uint8_t x, uint8_t y, uint8_t c) {
uint8_t Font::Draw90(unsigned char letter, int x, int y, uint8_t c) {
uint8_t maxx=0;
uint8_t charCol;
+2 -2
View File
@@ -29,8 +29,8 @@
namespace Font
{
extern uint8_t Draw(unsigned char letter, uint8_t x, uint8_t y, uint8_t c=1);
extern uint8_t Draw90(unsigned char letter, uint8_t x, uint8_t y, uint8_t c=1);
extern uint8_t Draw(unsigned char letter, int x, int y, uint8_t c=1);
extern uint8_t Draw90(unsigned char letter, int x, int y, uint8_t c=1);
}
#endif