LCD LIB
Fork of RA8875 by
Diff: GraphicsDisplay.h
- Revision:
- 101:e0aad446094a
- Parent:
- 100:0b084475d5a9
- Child:
- 104:8d1d3832a215
diff -r 0b084475d5a9 -r e0aad446094a GraphicsDisplay.h --- a/GraphicsDisplay.h Sat Dec 19 15:55:09 2015 +0000 +++ b/GraphicsDisplay.h Sun Jan 17 22:16:37 2016 +0000 @@ -192,21 +192,37 @@ virtual RetCode_t blit(int x, int y, int w, int h, const int * color); + /// This method returns the width in pixels of the chosen character + /// from the previously selected external font. + /// + /// @param[in] c is the character of interest. + /// @param[inout] width is a pointer to where the width will be stored. + /// This parameter is NULL tested and will only be written if not null + /// which is convenient if you only want the height. + /// @param[inout] height is a pointer to where the height will be stored. + /// This parameter is NULL tested and will only be written if not null + /// 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); + /// This method transfers one character from the external font data /// to the screen. /// + /// The font being used has already been set with the SelectUserFont + /// API. + /// /// @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[in] x is the horizontal pixel coordinate /// @param[in] y is the vertical pixel coordinate - /// @param[in] fontTable is the base of the table which has the metrics /// @param[in] c is the character to render /// @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 * fontTable, const unsigned char c); + virtual int fontblit(int x, int y, const unsigned char c); /// This method returns the color value from a palette. ///