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:
- 153:8a85efb3eb71
- Parent:
- 152:a013ac0133e4
- Child:
- 162:a2d7f1988711
--- a/GraphicsDisplay.cpp Mon Nov 06 01:41:55 2017 +0000 +++ b/GraphicsDisplay.cpp Sun Jul 29 00:32:51 2018 +0000 @@ -3,6 +3,8 @@ * Released under the MIT License: http://mbed.org/license/mit * * Derivative work by D.Smart 2014 + * 201807 Scalable soft-fonts and gif support + * */ #include "GraphicsDisplay.h" @@ -181,7 +183,6 @@ _putp(color[i]); } _EndGraphicsStream(); - //return WindowMax(); return window(restore); } @@ -229,18 +230,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; }