Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Adafruit_GFX by
Diff: Adafruit_GFX.cpp
- Revision:
- 1:e67555532f16
- Parent:
- 0:08cfbae05724
- Child:
- 2:d7b17984ea03
--- 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;