diff options
| author | Manolo Gouy <Manolo> | 2014-06-18 01:22:16 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-06-18 01:22:16 +0000 |
| commit | da5dff32ea54373e08772f230ac2c6edc8d7bdd5 (patch) | |
| tree | 7c851e2bf13ac2ff6737fb43a3691961ebc21963 | |
| parent | 06ee4b9b14d825c77e464ae59fed5544d802d4a5 (diff) | |
Sets the return type of Fl_Image_Surface::image() to its real value, Fl_RGB_Image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10200 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/Fl_Image_Surface.H | 6 | ||||
| -rw-r--r-- | src/Fl_Image_Surface.cxx | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index 7c2362b2d..39276117d 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -28,7 +28,7 @@ After creation of an Fl_Image_Surface object, call set_current() on it, and all subsequent graphics requests will be recorded in the image. It's possible to draw widgets (using Fl_Image_Surface::draw()) or to use any of the \ref fl_drawings or the \ref fl_attributes. - Finally, call image() on the object to obtain a newly allocated Fl_Image object. + Finally, call image() on the object to obtain a newly allocated Fl_RGB_Image object. <br> Fl_GL_Window objects can be drawn in the image as well. <br> Usage example: @@ -38,7 +38,7 @@ img_surf->set_current(); // direct graphics requests to the image fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw a white background img_surf->draw(g); // draw the g widget in the image - Fl_Image* image = img_surf->image(); // get the resulting image + Fl_RGB_Image* image = img_surf->image(); // get the resulting image delete img_surf; // delete the img_surf object Fl_Display_Device::display_device()->set_current(); // direct graphics requests back to the display \endcode @@ -67,7 +67,7 @@ public: ~Fl_Image_Surface(); void set_current(); void draw(Fl_Widget*, int delta_x = 0, int delta_y = 0); - Fl_Image *image(); + Fl_RGB_Image *image(); }; #ifdef __APPLE__ diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 1d5e6f5d8..b64004a61 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -64,11 +64,10 @@ Fl_Image_Surface::~Fl_Image_Surface() { #endif } -/** Returns the image made of all drawings sent to the Fl_Image_Surface object. - The returned object can be safely cast to Fl_RGB_Image* and contains its own copy - of the RGB data. +/** Returns an image made of all drawings sent to the Fl_Image_Surface object. + The returned object contains its own copy of the RGB data. */ -Fl_Image* Fl_Image_Surface::image() +Fl_RGB_Image* Fl_Image_Surface::image() { unsigned char *data; #ifdef __APPLE__ |
