diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-10-31 14:20:04 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-10-31 14:20:04 +0100 |
| commit | 995a48dd003b51291bb1f2c5513c529a1ad8dfed (patch) | |
| tree | 8023e155595160449e08b3d562d6667389c45dc3 /FL/Fl_Device.H | |
| parent | 96034b565769fc0e3333e1830d053c732f4178f3 (diff) | |
Consistently make Fl_Paged_Device::begin_page call Fl_Surface_Device::push_current.
Diffstat (limited to 'FL/Fl_Device.H')
| -rw-r--r-- | FL/Fl_Device.H | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index 6bf7cb675..890d4f744 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -38,14 +38,15 @@ class Fl_Widget; A drawing surface other than the computer's display, is typically used as follows: <ol><li> Create \c surface, an object from a particular Fl_Surface_Device derived class (e.g., Fl_Copy_Surface, Fl_Printer). - <li> Call \c Fl_Surface_Device::push_current(surface); to redirect all graphics requests to \c surface which becomes the new - current drawing surface (not necessary with class Fl_Printer because it is done by Fl_Printer::begin_job()). + <li> Call \c Fl_Surface_Device::push_current(surface); to redirect all graphics requests to + \c surface which becomes the new current drawing surface (not necessary with classes Fl_Printer / Fl_PostScript_File_Device + because it is done by Fl_Paged_Device::begin_page()). <li> At this point all of the \ref fl_drawings (e.g., fl_rect()) or the \ref fl_attributes or \ref drawing_images functions (e.g., fl_draw_image(), Fl_Image::draw()) operate on the new current drawing surface. Drawing surfaces from Fl_Widget_Surface derived classes allow additional ways to draw to them (e.g., Fl_Printer::print_widget(), Fl_Image_Surface::draw()). <li> After all drawing requests have been performed, redirect graphics requests back to their previous destination - with \c Fl_Surface_Device::pop_current();. + with \c Fl_Surface_Device::pop_current(); (not necessary with classes Fl_Printer / Fl_PostScript_File_Device). <li> Delete \c surface. </ol> For back-compatibility, it is also possible to use the Fl_Surface_Device::set_current() member function |
