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
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)
Diff: GraphicsDisplay.cpp
- Revision:
- 151:ae94daaaf8ad
- Parent:
- 146:373d59f08357
--- a/GraphicsDisplay.cpp Sun Sep 24 02:09:57 2017 +0000 +++ b/GraphicsDisplay.cpp Sat Apr 14 17:48:59 2018 +0000 @@ -178,7 +178,6 @@ _putp(color[i]); } _EndGraphicsStream(); - //return WindowMax(); return window(restore); } @@ -226,18 +225,13 @@ int GraphicsDisplay::fontblit(loc_t x, loc_t y, const unsigned char c) { - const uint8_t * charRecord; // width, data, data, data, ... - dim_t charWidth, charHeight; + const uint8_t * charRecord; // pointer to char data; width, data, data, data, ... + dim_t charWidth, charHeight; // metrics for the raw char in the font table charRecord = getCharMetrics(c, &charWidth, &charHeight); if (charRecord) { INFO("hgt:%d, wdt:%d", charHeight, charWidth); - // clip to the edge of the screen - //if (x + charWidth >= width()) - // charWidth = width() - x; - //if (y + charHeight >= height()) - // charHeight = height() - y; booleanStream(x,y,charWidth, charHeight, charRecord); - return charWidth; + return charWidth * fontScaleX; } else { return 0; }