diff options
| -rw-r--r-- | FL/fl_draw.H | 20 | ||||
| -rw-r--r-- | src/fl_draw_pixmap.cxx | 19 |
2 files changed, 18 insertions, 21 deletions
diff --git a/FL/fl_draw.H b/FL/fl_draw.H index 11a7f3bc6..f1a867071 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -796,8 +796,24 @@ inline char fl_can_do_alpha_blending() {return Fl_Graphics_Driver::default_drive FL_EXPORT uchar *fl_read_image(uchar *p,int X,int Y,int W,int H,int alpha=0); // pixmaps: -FL_EXPORT int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color=FL_GRAY); -FL_EXPORT int fl_draw_pixmap(const char* const* cdata, int x,int y,Fl_Color=FL_GRAY); +/** + Draw XPM image data, with the top-left corner at the given position. + The image is dithered on 8-bit displays so you won't lose color + space for programs displaying both images and pixmaps. + \param[in] data pointer to XPM image data + \param[in] x,y position of top-left corner + \param[in] bg background color + \returns 0 if there was any error decoding the XPM data. + */ +FL_EXPORT int fl_draw_pixmap(const char* const* data, int x,int y,Fl_Color bg=FL_GRAY); +/** + Draw XPM image data, with the top-left corner at the given position. + \see fl_draw_pixmap(const char* const* data, int x, int y, Fl_Color bg) + */ +inline int fl_draw_pixmap(/*const*/ char* const* data, int x, int y, Fl_Color bg=FL_GRAY) +{ + return fl_draw_pixmap((const char*const*)data,x,y,bg); +} FL_EXPORT int fl_measure_pixmap(/*const*/ char* const* data, int &w, int &h); FL_EXPORT int fl_measure_pixmap(const char* const* cdata, int &w, int &h); diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx index 8484d409c..8669331c1 100644 --- a/src/fl_draw_pixmap.cxx +++ b/src/fl_draw_pixmap.cxx @@ -74,21 +74,6 @@ int fl_measure_pixmap(const char * const *cdata, int &w, int &h) { return 1; } - -/** - Draw XPM image data, with the top-left corner at the given position. - The image is dithered on 8-bit displays so you won't lose color - space for programs displaying both images and pixmaps. - \param[in] data pointer to XPM image data - \param[in] x,y position of top-left corner - \param[in] bg background color - \returns 0 if there was any error decoding the XPM data. - */ -int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color bg) { - return fl_draw_pixmap((const char*const*)data,x,y,bg); -} - - #if defined(FL_CFG_SYS_WIN32) @@ -236,10 +221,6 @@ int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg) { return 1; } -/** - Draw XPM image data, with the top-left corner at the given position. - \see fl_draw_pixmap(char* const* data, int x, int y, Fl_Color bg) - */ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) { int w, h; |
