From 9c389d34f981b06affdb63fd5fdf20da61283277 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 26 Apr 2018 12:00:49 +0000 Subject: 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 --- src/Fl_Image_Surface.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Fl_Image_Surface.cxx') 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()); } -- cgit v1.2.3