A first port of the excellent Adafruit GFX library

Dependents:   Adafruit_GFX

Revision:
1:e67555532f16
Parent:
0:08cfbae05724
Child:
2:a7d4ac7ed08a
--- a/Adafruit_GFX.cpp	Tue Mar 26 23:08:53 2013 +0000
+++ b/Adafruit_GFX.cpp	Thu Aug 15 13:26:47 2013 +0000
@@ -17,9 +17,10 @@
 #include "Adafruit_GFX.h"
 #include "glcdfont.h"
 
-void Adafruit_GFX::constructor(int16_t w, int16_t h) {
-  _width = WIDTH = w;
-  _height = HEIGHT = h;
+Adafruit_GFX::Adafruit_GFX(int16_t w, int16_t h): WIDTH(w), HEIGHT(h) {
+ 
+  _width = WIDTH;
+  _height = HEIGHT;
 
   rotation = 0;    
   cursor_y = cursor_x = 0;
@@ -347,7 +348,6 @@
 }
 
 int  Adafruit_GFX::_putc(int c) {
-//#endif
   if (c == '\n') {
     cursor_y += textsize*8;
     cursor_x = 0;
@@ -374,7 +374,7 @@
 
   if((x >= _width)            || // Clip right
      (y >= _height)           || // Clip bottom
-     ((x + 5 * size - 1) < 0) || // Clip left
+     ((x + 6 * size - 1) < 0) || // Clip left
      ((y + 8 * size - 1) < 0))   // Clip top
     return;