diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-21 20:09:32 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-21 20:09:32 +0000 |
commit | 1b917134adffafb33057be34683b5f73807aeca8 (patch) | |
tree | a548cfe35af25a0d7b7b3a8a304784c334aecdb6 /NxWidgets/libnxwidgets/include/cgraphicsport.hxx | |
parent | 2e885817755dbb96fa4183a312ea181b28bb70b1 (diff) | |
download | nuttx-1b917134adffafb33057be34683b5f73807aeca8.tar.gz nuttx-1b917134adffafb33057be34683b5f73807aeca8.tar.bz2 nuttx-1b917134adffafb33057be34683b5f73807aeca8.zip |
Patches from Petteri Aimonen (plus a few other things)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5448 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/include/cgraphicsport.hxx')
-rw-r--r-- | NxWidgets/libnxwidgets/include/cgraphicsport.hxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/NxWidgets/libnxwidgets/include/cgraphicsport.hxx b/NxWidgets/libnxwidgets/include/cgraphicsport.hxx index b9fbc4d41..d3d9e6114 100644 --- a/NxWidgets/libnxwidgets/include/cgraphicsport.hxx +++ b/NxWidgets/libnxwidgets/include/cgraphicsport.hxx @@ -111,6 +111,22 @@ namespace NXWidgets nxgl_mxpixel_t m_backColor; /**< The background color to use */ #endif + /** + * The underlying implementation for drawText functions + * @param pos The window-relative x/y coordinate of the string. + * @param bound The window-relative bounds of the string. + * @param font The font to draw with. + * @param string The string to output. + * @param startIndex The start index within the string from which + * drawing will commence. + * @param length The number of characters to draw. + * @param background Color to use for background if transparent is false. + * @param transparent Whether to fill the background. + */ + void drawText(struct nxgl_point_s *pos, CRect *bound, CNxFont *font, + const CNxString &string, int startIndex, int length, + nxgl_mxpixel_t background, bool transparent); + public: /** * Constructor. @@ -330,6 +346,24 @@ namespace NXWidgets const CNxString &string, int startIndex, int length); /** + * Draw a portion of a string to the window and fill the background + * in one go. + * @param pos The window-relative x/y coordinate of the string. + * @param bound The window-relative bounds of the string. + * @param font The font to draw with. + * @param string The string to output. + * @param startIndex The start index within the string from which + * drawing will commence. + * @param length The number of characters to draw. + * @param color Foreground color + * @param background Background color + */ + + void drawText(struct nxgl_point_s *pos, CRect *bound, CNxFont *font, + const CNxString &string, int startIndex, int length, + nxgl_mxpixel_t color, nxgl_mxpixel_t background); + + /** * Draw an opaque bitmap to the window. * * @param x The window-relative x coordinate to draw the bitmap to. |