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 --- FL/Fl_Image_Surface.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index 01c05a87d..ac8f2d24d 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -99,7 +99,8 @@ protected: int width; int height; Fl_Offscreen offscreen; - Fl_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off) : Fl_Widget_Surface(NULL), width(w), height(h), offscreen(off) {} + int external_offscreen; + Fl_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off) : Fl_Widget_Surface(NULL), width(w), height(h), offscreen(off) {external_offscreen = (off != 0);} virtual ~Fl_Image_Surface_Driver() {} virtual void set_current() {} virtual void translate(int x, int y) {} -- cgit v1.2.3