Forked para SNOCC

Dependencies:   GPS

Dependents:   SNOCC_V1 SNOCC_V2

Fork of RA8875 by SNOCC

Revision:
41:2956a0a221e5
Parent:
37:f19b7e7449dc
Child:
42:7cbdfd2bbfc5
--- a/GraphicsDisplay.h	Tue Feb 04 02:58:06 2014 +0000
+++ b/GraphicsDisplay.h	Sat Feb 08 17:35:45 2014 +0000
@@ -48,6 +48,40 @@
     ///
     virtual RetCode_t pixel(loc_t x, loc_t y, color_t color) = 0;
     
+    /// Write a stream of pixels to the display.
+    ///
+    /// @note this method must be supported in the derived class.
+    ///
+    /// @param p is a pointer to a color_t array to write.
+    /// @param count is the number of pixels to write.
+    /// @param x is the horizontal position on the display.
+    /// @param y is the vertical position on the display.
+    /// @returns success/failure code. @see RetCode_t.
+    ///
+    virtual RetCode_t pixelStream(color_t * p, uint32_t count, loc_t x, loc_t y) = 0;
+
+    /// Get a pixel from the display.
+    ///
+    /// @note this method must be supported in the derived class.
+    ///
+    /// @param x is the horizontal offset to this pixel.
+    /// @param y is the vertical offset to this pixel.
+    /// @returns the pixel. see @color_t
+    ///
+    virtual color_t getPixel(loc_t x, loc_t y) = 0;
+
+    /// Get a stream of pixels from the display.
+    ///
+    /// @note this method must be supported in the derived class.
+    ///
+    /// @param p is a pointer to a color_t array to accept the stream.
+    /// @param count is the number of pixels to read.
+    /// @param x is the horizontal offset to this pixel.
+    /// @param y is the vertical offset to this pixel.
+    /// @returns success/failure code. @see RetCode_t.
+    ///
+    virtual RetCode_t getPixelStream(color_t * p, uint32_t count, loc_t x, loc_t y) = 0;
+    
     /// get the screen width in pixels
     ///
     /// @note this method must be supported in the derived class.
@@ -75,6 +109,15 @@
     ///
     virtual RetCode_t SetGraphicsCursor(loc_t x, loc_t y) = 0;
     
+    /// Prepare the controller to read binary data from the screen by positioning
+    /// the memory read cursor.
+    ///
+    /// @param x is the horizontal position in pixels (from the left edge)
+    /// @param y is the vertical position in pixels (from the top edge)
+    /// @returns success/failure code. @see RetCode_t.
+    ///
+    virtual RetCode_t SetGraphicsCursorRead(loc_t x, loc_t y) = 0;
+    
     /// Draw a filled rectangle in the specified color
     ///
     /// @note As a side effect, this changes the current
@@ -168,6 +211,13 @@
     ///
     color_t RGBQuadToRGB16(RGBQUAD * colorPalette, uint16_t i);
     
+    /// This method converts a 16-bit color value into a 24-bit RGB Quad.
+    ///
+    /// @param c is the 16-bit color. @see color_t
+    /// @returns an RGBQUAD value. @see RGBQUAD
+    ///
+    RGBQUAD RGB16ToRGBQuad(color_t c);
+
     /// This method reads a disk file that is in bitmap format and 
     /// puts it on the screen.
     ///
@@ -207,6 +257,19 @@
     ///
     RetCode_t RenderBitmapFile(loc_t x, loc_t y, const char *Name_BMP);
     
+    /// 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
+    /// 24-bit format.
+    ///
+    /// @param x is the left edge of the region to capture
+    /// @param y is the top edge of the region to capture
+    /// @param w is the width of the region to capture
+    /// @param h is the height of the region to capture.
+    /// @return success or error code.
+    ///
+    RetCode_t PrintScreen(loc_t x, loc_t y, dim_t w, dim_t h, const char *Name_BMP);
+    
     /// prints one character at the specified coordinates.
     ///
     /// This will print the character at the specified pixel coordinates.