Forked para SNOCC

Dependencies:   GPS

Dependents:   SNOCC_V1 SNOCC_V2

Fork of RA8875 by SNOCC

Revision:
29:422616aa04bd
Parent:
19:3f82c1161fd2
Child:
31:c72e12cd5c67
--- a/GraphicsDisplay.h	Fri Jan 17 17:24:05 2014 +0000
+++ b/GraphicsDisplay.h	Sun Jan 19 04:24:16 2014 +0000
@@ -31,15 +31,43 @@
     
     virtual RetCode_t cls();
     virtual void fill(int x, int y, int w, int h, int colour);
-    virtual void blit(int x, int y, int w, int h, const int *colour);    
-    virtual void blitbit(int x, int y, int w, int h, const char* colour);
+    virtual void blit(int x, int y, int w, int h, const int * colour);    
+    
+    virtual int blitbit(int x, int y, int w, int h, const char * colour);
     
-    virtual void character(int column, int row, int value);
+    /// This method transfers one character from the external font data
+    /// to the screen.
+    ///
+    /// @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 x is the horizontal pixel coordinate
+    /// @param y is the vertical pixel coordinate
+    /// @param fontTable is the base of the table which has the metrics
+    /// @param fontChar is the start of that record in the table for the char (e.g. 'A' - 'Z')
+    /// @returns how far the cursor should advance to the right in pixels
+    ///
+    virtual int fontblit(int x, int y, const unsigned char * fontTable, const unsigned char * fontChar);
+    
+    /// prints one character at the specified coordinates.
+    ///
+    /// This will print the character at the specified pixel coordinates.
+    ///
+    /// @param x is the horizontal offset in pixels.
+    /// @param y is the vertical offset in pixels.
+    /// @param value is the character to print.
+    /// @returns number of pixels to index to the right if a character was printed, 0 otherwise.
+    ///
+    virtual int character(int x, int y, int value);
+    
     virtual int columns();
     virtual int rows();
+    virtual RetCode_t set_font(const unsigned char * font = NULL);
     
 protected:
-
+    const unsigned char * font;     ///< reference to an external font somewhere in memory
+    
     // pixel location
     short _x;
     short _y;
@@ -49,7 +77,6 @@
     short _x2;
     short _y1;
     short _y2;
-
 };
 
 #endif