diff options
| author | Manolo Gouy <Manolo> | 2015-03-24 14:20:38 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-03-24 14:20:38 +0000 |
| commit | 6ea2b8baea26cbf7e29ec5085c2ef07cd68a0b3d (patch) | |
| tree | dac0e90cf0ffe0185b9eb89ac883e247b8f89393 /FL | |
| parent | 54773419f9ab87097aea688e330a20ee564cee28 (diff) | |
More detailed documentation about drawing to other surfaces than the computer display.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10651 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Device.H | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index df66e7a75..caece3b7c 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -101,8 +101,8 @@ public: in the \ref fl_drawings and \ref fl_attributes modules. \p The Fl_Graphics_Driver class is of interest if one wants to perform new kinds of drawing operations. - An example would be to draw to a PDF file. This would involve creating a new Fl_Graphics_Driver derived class, - say, my_PDF_Graphics_Driver. This new class should implement all virtual methods of the Fl_Graphics_Driver class + An example would be to draw to a PDF file. This would involve creating a new Fl_Graphics_Driver derived + class. This new class should implement all virtual methods of the Fl_Graphics_Driver class to support all FLTK drawing functions. */ class FL_EXPORT Fl_Graphics_Driver : public Fl_Device { @@ -534,17 +534,17 @@ public: /** \brief A drawing surface that's susceptible to receive graphical output. A drawing surface is typically used as follows: - \li Create \c surface, an object from a particular Fl_Surface_Device derived class (e.g., Fl_Copy_Surface, Fl_Printer). - \li Memorize what is the current drawing surface with <tt> Fl_Surface_Device *old_current = Fl_Surface_Device::surface();</tt> - \li Call \c surface->set_current(); to redirect all graphics requests to \c surface which becomes the new + <ol><li> Create \c surface, an object from a particular Fl_Surface_Device derived class (e.g., Fl_Copy_Surface, Fl_Printer). + <li> Memorize what is the current drawing surface with <tt> Fl_Surface_Device *old_current = Fl_Surface_Device::surface();</tt> + <li> Call \c surface->set_current(); 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::start_job()). - \li At this point any 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. + <li> At this point any 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()) operates on the new current drawing surface. Certain drawing surfaces 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 + <li> After all drawing requests have been performed, redirect graphics requests back to their previous destination with \c old_current->set_current();. - \li Delete \c surface. - + <li> Delete \c surface. + </ol> The current drawing surface is initially the computer's display, an instance of the Fl_Display_Device class. */ class FL_EXPORT Fl_Surface_Device : public Fl_Device { @@ -562,7 +562,8 @@ public: inline void driver(Fl_Graphics_Driver *graphics_driver) {_driver = graphics_driver;}; /** \brief Returns the graphics driver of this drawing surface. */ inline Fl_Graphics_Driver *driver() {return _driver; }; - /** \brief the surface that currently receives graphics output */ + /** The current drawing surface. + In other words, the Fl_Surface_Device object that currently receives all graphics output */ static inline Fl_Surface_Device *surface() {return _surface; }; /** \brief The destructor. */ virtual ~Fl_Surface_Device() {} |
