Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.

Dependents:   FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more

Fork of SPI_TFT by Peter Drescher

See Components - RA8875 Based Display

Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.

Offline Help Manual (Windows chm)

/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)

Revision:
114:dbfb996bfbf3
Parent:
112:325ca91bc03d
Child:
115:c9862fd0c689
--- a/GraphicsDisplay.cpp	Wed Apr 27 01:29:55 2016 +0000
+++ b/GraphicsDisplay.cpp	Sun May 15 18:57:06 2016 +0000
@@ -105,13 +105,18 @@
     return window(r.p1.x, r.p1.y, r.p2.x + 1 - r.p1.x, r.p2.y + 1 - r.p1.y);
 }
 
-RetCode_t GraphicsDisplay::window(loc_t x, loc_t y, dim_t width, dim_t height)
+RetCode_t GraphicsDisplay::window(loc_t x, loc_t y, dim_t _width, dim_t _height)
 {
+    if (_width == (dim_t)-1)
+        _width = width() - x;
+    if (_height == (dim_t)-1)
+        _height = height() - y;
+
     // Save the window metrics
     windowrect.p1.x = x;
     windowrect.p1.y = y;
-    windowrect.p2.x = x + width - 1;
-    windowrect.p2.y = y + height - 1;
+    windowrect.p2.x = x + _width - 1;
+    windowrect.p2.y = y + _height - 1;
     // current pixel location
     _x = x;
     _y = y;