BurstSPI support for improved performance
Fork of RA8875 by
Diff: GraphicsDisplay.h
- Revision:
- 37:f19b7e7449dc
- Parent:
- 36:300f6ee0b2cf
- Child:
- 41:2956a0a221e5
diff -r 300f6ee0b2cf -r f19b7e7449dc GraphicsDisplay.h --- a/GraphicsDisplay.h Sat Jan 25 00:00:02 2014 +0000 +++ b/GraphicsDisplay.h Sat Jan 25 19:47:33 2014 +0000 @@ -16,6 +16,13 @@ #include "Bitmap.h" #include "TextDisplay.h" +// GraphicsDisplay has one "soft font" which is in a different format +// then the primary font rendering api - see set_font(...). This is +// therefore deprecated, but preserved for a time for backward +// compatibility. +// #define LOCALFONT + + /// The GraphicsDisplay class /// /// This graphics display class supports both graphics and text operations. @@ -39,7 +46,7 @@ /// @param color defines the color for the pixel. /// @returns success/failure code. @see RetCode_t. /// - virtual RetCode_t pixel(unsigned int x, unsigned int y, color_t color) = 0; + virtual RetCode_t pixel(loc_t x, loc_t y, color_t color) = 0; /// get the screen width in pixels /// @@ -66,7 +73,7 @@ /// @param y is the vertical position in pixels (from the top edge) /// @returns success/failure code. @see RetCode_t. /// - virtual RetCode_t SetGraphicsCursor(uint16_t x, uint16_t y) = 0; + virtual RetCode_t SetGraphicsCursor(loc_t x, loc_t y) = 0; /// Draw a filled rectangle in the specified color /// @@ -83,7 +90,7 @@ /// @param fillit is optional to NOFILL the rectangle. default is FILL. /// @returns success/failure code. @see RetCode_t. /// - virtual RetCode_t fillrect(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, + virtual RetCode_t fillrect(loc_t x1, loc_t y1, loc_t x2, loc_t y2, color_t color, fill_t fillit = FILL) = 0; @@ -102,7 +109,7 @@ /// @param h is the window height in pixels. /// @returns success/failure code. @see RetCode_t. /// - virtual RetCode_t window(unsigned int x, unsigned int y, unsigned int w, unsigned int h); + virtual RetCode_t window(loc_t x, loc_t y, dim_t w, dim_t h); /// Clear the screen. /// @@ -130,8 +137,6 @@ virtual void fill(int x, int y, int w, int h, color_t color); virtual void blit(int x, int y, int w, int h, const int * color); - virtual int blitbit(int x, int y, int w, int h, const char * color); - /// This method transfers one character from the external font data /// to the screen. /// @@ -200,7 +205,7 @@ /// @param Name_BMP is the filename on the local file system. /// @returns success or error code. /// - RetCode_t RenderBitmapFile(unsigned int x, unsigned int y, const char *Name_BMP); + RetCode_t RenderBitmapFile(loc_t x, loc_t y, const char *Name_BMP); /// prints one character at the specified coordinates. /// @@ -280,6 +285,10 @@ /// virtual RetCode_t _EndGraphicsStream(void) = 0; + #ifdef LOCALFONT + virtual int blitbit(int x, int y, int w, int h, const char * color); + #endif + const unsigned char * font; ///< reference to an external font somewhere in memory // pixel location