Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RA8875 by
Diff: GraphicsDisplay.h
- Revision:
- 111:39f22e0c8de4
- Parent:
- 110:7b94f06f085b
--- a/GraphicsDisplay.h Mon Mar 14 02:20:40 2016 +0000
+++ b/GraphicsDisplay.h Sat Mar 19 20:49:14 2016 +0000
@@ -189,10 +189,10 @@
/// @param[in] h specifies the height of the region.
/// @returns success/failure code. @see RetCode_t.
///
- virtual RetCode_t fill(int x, int y, int w, int h, color_t color);
+ virtual RetCode_t fill(loc_t x, loc_t y, dim_t w, dim_t h, color_t color);
- virtual RetCode_t blit(int x, int y, int w, int h, const int * color);
+ 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.
@@ -206,7 +206,7 @@
/// 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, uint8_t * width, uint8_t * height);
+ 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.
@@ -224,7 +224,7 @@
/// @returns how far the cursor should advance to the right in pixels.
/// @returns zero if the character could not be rendered.
///
- virtual int fontblit(int x, int y, const unsigned char c);
+ virtual int fontblit(loc_t x, loc_t y, const unsigned char c);
/// This method returns the color value from a palette.
///
@@ -405,6 +405,27 @@
///
RetCode_t _RenderBitmap(loc_t x, loc_t y, uint32_t fileOffset, FILE * Image);
+ /// Pure virtual method to write a boolean stream to the display.
+ ///
+ /// This takes a bit stream in memory and using the current color settings
+ /// it will stream it to the display. Along the way, each bit is translated
+ /// to either the foreground or background color value and then that pixel
+ /// is pushed onward.
+ ///
+ /// This is similar, but different, to the @ref pixelStream API, which is
+ /// given a stream of color values.
+ ///
+ /// @param[in] x is the horizontal position on the display.
+ /// @param[in] y is the vertical position on the display.
+ /// @param[in] w is the width of the rectangular region to fill.
+ /// @param[in] h is the height of the rectangular region to fill.
+ /// @param[in] boolStream is the inline memory image from which to extract
+ /// the bitstream.
+ /// @returns success/failure code. See @ref RetCode_t.
+ ///
+ 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
