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_Copy_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_Copy_Surface.H')
| -rw-r--r-- | FL/Fl_Copy_Surface.H | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H index 0d7a4f17c..ffe24fe83 100644 --- a/FL/Fl_Copy_Surface.H +++ b/FL/Fl_Copy_Surface.H @@ -23,7 +23,7 @@ /** Supports copying of graphical data to the clipboard. - <br> After creation of an Fl_Copy_Surface object, call set_current() on it, and all subsequent graphics requests + <br> After creation of an Fl_Copy_Surface object, make it the current drawing surface calling Fl_Surface_Device::push_current(), and all subsequent graphics requests will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw() ) or to use any of the \ref fl_drawings or the \ref fl_attributes. Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data. @@ -32,11 +32,11 @@ \code Fl_Widget *g = ...; // a widget you want to copy to the clipboard Fl_Copy_Surface *copy_surf = new Fl_Copy_Surface(g->w(), g->h()); // create an Fl_Copy_Surface object - copy_surf->set_current(); // direct graphics requests to the clipboard + Fl_Surface_Device::push_current(copy_surf); // direct graphics requests to the clipboard fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw a white background copy_surf->draw(g); // draw the g widget in the clipboard + Fl_Surface_Device::pop_current(); // direct graphics requests back to their previous destination delete copy_surf; // after this, the clipboard is loaded - Fl_Display_Device::display_device()->set_current(); // direct graphics requests back to the display \endcode Platform details: \li Windows: Transparent RGB images copy without transparency. |
