summaryrefslogtreecommitdiff
path: root/src/Fl_Image_Surface.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-04-26 12:00:49 +0000
committerManolo Gouy <Manolo>2018-04-26 12:00:49 +0000
commit9c389d34f981b06affdb63fd5fdf20da61283277 (patch)
tree246fb0204362f8787804ae03031c62ad66d6a8c9 /src/Fl_Image_Surface.cxx
parentdd93cbd88860b142dc7fff99956cbf88b403be03 (diff)
Simplify API for Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res, Fl_Offscreen off) with non-null offscreen.
The caller no longer needs to call Fl_Image_Surface::get_offscreen_before_delete() before object deletion, because the object destructor knows the offscreen has not been created by the Fl_Image_Surface constructor. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Image_Surface.cxx')
-rw-r--r--src/Fl_Image_Surface.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx
index 9333d858a..0f77006c2 100644
--- a/src/Fl_Image_Surface.cxx
+++ b/src/Fl_Image_Surface.cxx
@@ -39,11 +39,13 @@ Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, i
\p w x \p h expressed in FLTK units.
If \p highres is non-zero, always use Fl_Image_Surface::highres_image() to get the image data.
- \param pixmap Is used internally by FLTK; applications just use its default value.
+ \param off If not null, the image surface is constructed around a pre-existing
+ Fl_Offscreen. The caller is responsible for both construction and destruction of this Fl_Offscreen object.
+ Is mostly intended for internal use by FLTK.
\version 1.3.4 (1.3.3 without the \p highres parameter)
*/
-Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res, Fl_Offscreen pixmap) : Fl_Widget_Surface(NULL) {
- platform_surface = Fl_Image_Surface_Driver::newImageSurfaceDriver(w, h, high_res, pixmap);
+Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res, Fl_Offscreen off) : Fl_Widget_Surface(NULL) {
+ platform_surface = Fl_Image_Surface_Driver::newImageSurfaceDriver(w, h, high_res, off);
if (platform_surface) driver(platform_surface->driver());
}