modify
Dependents: ThingPlug_Ethernet_Example_temp_V2
Fork of Adafruit_GFX by
Revision 5:d533c761006e, committed 2015-08-15
- Comitter:
- irinakim
- Date:
- Sat Aug 15 23:25:09 2015 +0000
- Parent:
- 4:256d9b541ab0
- Commit message:
- l;
Changed in this revision
Adafruit_GFX.cpp | Show annotated file Show diff for this revision Revisions of this file |
Adafruit_GFX.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 256d9b541ab0 -r d533c761006e Adafruit_GFX.cpp --- a/Adafruit_GFX.cpp Thu Jul 30 05:20:08 2015 +0000 +++ b/Adafruit_GFX.cpp Sat Aug 15 23:25:09 2015 +0000 @@ -34,7 +34,7 @@ #include "mbed.h" #include "Adafruit_GFX.h" #include "glcdfont.h" - +LocateDef LOC; Adafruit_GFX::Adafruit_GFX(int16_t w, int16_t h): WIDTH(w), HEIGHT(h) { _width = WIDTH; @@ -233,7 +233,7 @@ void Adafruit_GFX::fillScreen(uint16_t color) { - fillRect(0, 0, _width, _height, color); + fillRect(0,0, _width, _height, color); } // draw a rounded rectangle! @@ -425,6 +425,16 @@ cursor_x = x; cursor_y = y; } + + + +void Adafruit_GFX::getCursor(LocateDef *LOC) +{ + + LOC->x_data=cursor_x; + LOC->y_data=cursor_y; + +} void Adafruit_GFX::setTextSize(uint8_t s) {
diff -r 256d9b541ab0 -r d533c761006e Adafruit_GFX.h --- a/Adafruit_GFX.h Thu Jul 30 05:20:08 2015 +0000 +++ b/Adafruit_GFX.h Sat Aug 15 23:25:09 2015 +0000 @@ -40,6 +40,11 @@ #define swap(a, b) { int16_t t = a; a = b; b = t; } #define boolean bool +struct LocateDef +{ + uint16_t x_data; + uint16_t y_data; +}; class Adafruit_GFX : public Stream { @@ -80,6 +85,7 @@ void setCursor(int16_t x, int16_t y); void setTextColor(uint16_t c); void setTextColor(uint16_t c, uint16_t bg); + void getCursor(LocateDef* LOC); void setTextSize(uint8_t s); void setTextWrap(boolean w); @@ -102,5 +108,6 @@ boolean wrap; // If set, 'wrap' text at right edge of display }; + #endif