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:
151:ae94daaaf8ad
Parent:
143:e872d65a710d
--- a/GraphicsDisplay.h	Sun Sep 24 02:09:57 2017 +0000
+++ b/GraphicsDisplay.h	Sat Apr 14 17:48:59 2018 +0000
@@ -309,38 +309,6 @@
     /// 
     virtual RetCode_t blit(loc_t x, loc_t y, dim_t w, dim_t h, const int * color);    
     
-    /// This method returns the width in pixels of the chosen character
-    /// from the previously selected external font.
-    ///
-    /// @param[in] c is the character of interest.
-    /// @param[in, out] width is a pointer to where the width will be stored.
-    ///     This parameter is NULL tested and will only be written if not null
-    ///     which is convenient if you only want the height.
-    /// @param[in, out] height is a pointer to where the height will be stored.
-    ///     This parameter is NULL tested and will only be written if not null
-    ///     which is convenient if you only want the width.
-    /// @returns a pointer to the raw character data or NULL if not found.
-    ///
-    virtual const uint8_t * getCharMetrics(const unsigned char c, dim_t * width, dim_t * height);
-    
-    /// This method transfers one character from the external font data
-    /// to the screen.
-    ///
-    /// The font being used has already been set with the SelectUserFont
-    /// API.
-    ///
-    /// @note the font data is in a special format as generate by
-    ///         the mikroe font creator.
-    ///         See http://www.mikroe.com/glcd-font-creator/
-    ///
-    /// @param[in] x is the horizontal pixel coordinate
-    /// @param[in] y is the vertical pixel coordinate
-    /// @param[in] c is the character to render
-    /// @returns how far the cursor should advance to the right in pixels.
-    /// @returns zero if the character could not be rendered.
-    ///
-    virtual int fontblit(loc_t x, loc_t y, const unsigned char c);
-    
     /// This method returns the color value from a palette.
     ///
     /// This method accepts a pointer to a Bitmap color palette, which
@@ -455,6 +423,40 @@
     RetCode_t RenderIconFile(loc_t x, loc_t y, const char *Name_ICO);
 
     
+    /// This method returns the width in pixels of the chosen character
+    /// from the previously selected external font.
+    ///
+    /// @param[in] c is the character of interest.
+    /// @param[in, out] width is a pointer to where the width will be stored.
+    ///     This parameter is NULL tested and will only be written if not null
+    ///     which is convenient if you only want the height.
+    /// @param[in, out] height is a pointer to where the height will be stored.
+    ///     This parameter is NULL tested and will only be written if not null
+    ///     which is convenient if you only want the width.
+    /// @returns a pointer to the raw character data or NULL if not found.
+    ///
+    virtual const uint8_t * getCharMetrics(const unsigned char c, dim_t * width, dim_t * height);
+
+    
+    /// This method transfers one character from the external font data
+    /// to the screen.
+    ///
+    /// The font being used has already been set with the SelectUserFont
+    /// API.
+    ///
+    /// @note the font data is in a special format as generate by
+    ///         the mikroe font creator.
+    ///         See http://www.mikroe.com/glcd-font-creator/
+    ///
+    /// @param[in] x is the horizontal pixel coordinate
+    /// @param[in] y is the vertical pixel coordinate
+    /// @param[in] c is the character to render
+    /// @returns how far the cursor should advance to the right in pixels.
+    /// @returns zero if the character could not be rendered.
+    ///
+    virtual int fontblit(loc_t x, loc_t y, const unsigned char c);
+    
+
     /// prints one character at the specified coordinates.
     ///
     /// This will print the character at the specified pixel coordinates.
@@ -605,13 +607,15 @@
     ///
     virtual RetCode_t booleanStream(loc_t x, loc_t y, dim_t w, dim_t h, const uint8_t * boolStream) = 0;
     
-
     const unsigned char * font;     ///< reference to an external font somewhere in memory
     
     // pixel location
     short _x;                       ///< keeps track of current X location
     short _y;                       ///< keeps track of current Y location
-    
+
+    uint8_t fontScaleX;             ///< tracks the font scale factor for Soft fonts. Range: 1 .. 4
+    uint8_t fontScaleY;             ///< tracks the font scale factor for soft fonts. Range: 1 .. 4
+        
     rect_t windowrect;              ///< window commands are held here for speed of access 
 };