diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-27 10:17:27 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-27 10:17:27 +0100 |
commit | 1e931fc5ca3a378fcf8eb42837ee1912c10a165a (patch) | |
tree | 2652fa9c74294e0739fdc9efe0a7b05629bebf8b /src | |
parent | 913bfcaffa8b2fd6c4343cc86abab74fdddf4712 (diff) |
add copyright for ScreenDump
Diffstat (limited to 'src')
-rw-r--r-- | src/ScreenDump.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
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 <Johannes.Hofmann@gmx.de> +// +// This software may be used and distributed according to the terms +// of the GNU General Public License, incorporated herein by reference. + #include <FL/Fl.H> #include <FL/x.H> #include <FL/fl_draw.H> @@ -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); |