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:
42:7cbdfd2bbfc5
Parent:
41:2956a0a221e5
Child:
55:dfbabef7003e
--- a/GraphicsDisplay.h	Sat Feb 08 17:35:45 2014 +0000
+++ b/GraphicsDisplay.h	Sun Feb 23 17:58:39 2014 +0000
@@ -218,6 +218,28 @@
     ///
     RGBQUAD RGB16ToRGBQuad(color_t c);
 
+    /// This method attempts to render a specified graphics image file at
+    /// the specified screen location.
+    ///
+    /// This supports several variants of the following file types:
+    /// \li Bitmap file format,
+    /// \li Icon file format.
+    ///
+    /// @note The specified image width and height, when adjusted for the 
+    ///     x and y origin, must fit on the screen, or the image will not
+    ///     be shown (it does not clip the image).
+    ///
+    /// @note The file extension is tested, and if it ends in a supported
+    ///     format, the appropriate handler is called to render that image.
+    ///
+    /// @param x is the horizontal pixel coordinate
+    /// @param y is the vertical pixel coordinate
+    /// @param FileName refers to the fully qualified path and file on 
+    ///     a mounted file system.
+    /// @returns success or error code.
+    ///
+    RetCode_t RenderImageFile(loc_t x, loc_t y, const char *FileName);
+
     /// This method reads a disk file that is in bitmap format and 
     /// puts it on the screen.
     ///
@@ -252,11 +274,29 @@
     /// 
     /// @param x is the horizontal pixel coordinate
     /// @param y is the vertical pixel coordinate
-    /// @param Name_BMP is the filename on the local file system.
+    /// @param Name_BMP is the filename on the mounted file system.
     /// @returns success or error code.
     ///
     RetCode_t RenderBitmapFile(loc_t x, loc_t y, const char *Name_BMP);
     
+    
+    /// This method reads a disk file that is in ico format and 
+    /// puts it on the screen.
+    ///
+    /// Reading the disk is slow, but a typical icon file is small
+    /// so it should be ok.
+    ///
+    /// @note An Icon file can have more than one icon in it. This
+    ///     implementation only processes the first image in the file.
+    ///
+    /// @param x is the horizontal pixel coordinate
+    /// @param y is the vertical pixel coordinate
+    /// @param Name_ICO is the filename on the mounted file system.
+    /// @returns success or error code.
+    ///
+    RetCode_t RenderIconFile(loc_t x, loc_t y, const char *Name_ICO);
+
+    
     /// This method captures the specified area as a 24-bit bitmap file.
     ///
     /// Even though this is a 16-bit display, the stored image is in
@@ -348,6 +388,19 @@
     ///
     virtual RetCode_t _EndGraphicsStream(void) = 0;
 
+    /// Protected method to render an image given a file handle and 
+    /// coordinates.
+    ///
+    /// @param x is the horizontal pixel coordinate
+    /// @param y is the vertical pixel coordinate
+    /// @param w is the image width restriction, or zero to permit full image width.
+    /// @param h is the image height restriction, or zero to permit full image height.
+    /// @param fileOffset is the offset into the file where the image data starts
+    /// @param Image is the filename stream already opened for the data.
+    /// @returns success or error code.
+    ///
+    RetCode_t _RenderBitmap(loc_t x, loc_t y, uint32_t fileOffset, FILE * Image);
+
     #ifdef LOCALFONT
     virtual int blitbit(int x, int y, int w, int h, const char * color);
     #endif