From 913bfcaffa8b2fd6c4343cc86abab74fdddf4712 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 27 Mar 2009 10:03:57 +0100 Subject: make ScreenDump more generic --- src/ScreenDump.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/ScreenDump.cxx') diff --git a/src/ScreenDump.cxx b/src/ScreenDump.cxx index 7a3447a..43fd6b1 100644 --- a/src/ScreenDump.cxx +++ b/src/ScreenDump.cxx @@ -4,17 +4,17 @@ #include "ScreenDump.H" -ScreenDump::ScreenDump(GipfelWidget *gipf) { +ScreenDump::ScreenDump(Fl_Widget *widget) { Fl_Offscreen offscreen; - w = gipf->w(); - h = gipf->h(); + w = widget->w(); + h = widget->h(); Fl::flush(); offscreen = fl_create_offscreen(w, h); fl_begin_offscreen(offscreen); - gipf->redraw(); - gipf->draw(); + widget->redraw(); + widget->draw(); rgb = fl_read_image(NULL, 0, 0, w, h); fl_end_offscreen(); fl_delete_offscreen(offscreen); @@ -27,7 +27,6 @@ ScreenDump::~ScreenDump() { int ScreenDump::save(OutputImage *out) { - out->init(w, h); for (int y = 0; y < h; y++) { -- cgit v1.2.3