From 1e931fc5ca3a378fcf8eb42837ee1912c10a165a Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 27 Mar 2009 10:17:27 +0100 Subject: add copyright for ScreenDump --- src/ScreenDump.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/ScreenDump.cxx b/src/ScreenDump.cxx index 43fd6b1..141c5bd 100644 --- a/src/ScreenDump.cxx +++ b/src/ScreenDump.cxx @@ -1,3 +1,9 @@ +// +// Copyright 2009 Johannes Hofmann +// +// This software may be used and distributed according to the terms +// of the GNU General Public License, incorporated herein by reference. + #include #include #include @@ -6,15 +12,20 @@ ScreenDump::ScreenDump(Fl_Widget *widget) { Fl_Offscreen offscreen; + int x, y; + x = widget->x(); + y = widget->y(); w = widget->w(); h = widget->h(); Fl::flush(); offscreen = fl_create_offscreen(w, h); fl_begin_offscreen(offscreen); + widget->resize(0, 0, w, h); widget->redraw(); widget->draw(); + widget->resize(x, y, w, h); rgb = fl_read_image(NULL, 0, 0, w, h); fl_end_offscreen(); fl_delete_offscreen(offscreen); -- cgit v1.2.3