diff options
| author | Manolo Gouy <Manolo> | 2018-02-25 06:53:34 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-02-25 06:53:34 +0000 |
| commit | 7049da0445eaf2b811b001c3989245ea5ef24075 (patch) | |
| tree | ef41830d813db4c3e9d919e13020db37d1c40512 /FL/Fl_Image_Surface.H | |
| parent | c9d4df288ceab6061d46dd1a5db36abcf8dc721a (diff) | |
Documentation: make code examples use Fl_Surface_Device::push_current()/pop_current()
instead of the deprecated Fl_Surface_Device::set_current().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12688 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Image_Surface.H')
| -rw-r--r-- | FL/Fl_Image_Surface.H | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index 5c638915e..01c05a87d 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -28,7 +28,8 @@ /** \brief Directs all graphics requests to an Fl_Image. - After creation of an Fl_Image_Surface object, call set_current() on it, and all + After creation of an Fl_Image_Surface object, make it the current drawing + surface calling Fl_Surface_Device::push_current(), 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 @@ -44,7 +45,7 @@ Fl_Image_Surface *image_surface = new Fl_Image_Surface(g->w(), g->h()); // direct all further graphics requests to the image - image_surface->set_current(); + Fl_Surface_Device::push_current(image_surface); // draw a white background fl_color(FL_WHITE); @@ -55,12 +56,12 @@ // get the resulting image Fl_RGB_Image* image = image_surface->image(); + + // direct graphics requests back to their previous destination + Fl_Surface_Device::pop_current(); // delete the image_surface object, but not the image itself delete image_surface; - - // direct graphics requests back to the screen - Fl_Display_Device::display_device()->set_current(); \endcode */ class FL_EXPORT Fl_Image_Surface : public Fl_Widget_Surface { |
