summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-27 10:03:57 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-27 10:03:57 +0100
commit913bfcaffa8b2fd6c4343cc86abab74fdddf4712 (patch)
tree187fb8433522fece401d5757972c9746b826ab0a /src
parent9b1de6cec6725319a5ec66c1b37bf14c7833747b (diff)
make ScreenDump more generic
Diffstat (limited to 'src')
-rw-r--r--src/ScreenDump.H5
-rw-r--r--src/ScreenDump.cxx11
2 files changed, 8 insertions, 8 deletions
diff --git a/src/ScreenDump.H b/src/ScreenDump.H
index d99a72d..8564054 100644
--- a/src/ScreenDump.H
+++ b/src/ScreenDump.H
@@ -7,7 +7,8 @@
#ifndef SCREENDUMP_H
#define SCREENDUMP_H
-#include "GipfelWidget.H"
+#include <FL/Fl_Widget.H>
+
#include "OutputImage.H"
class ScreenDump {
@@ -16,7 +17,7 @@ class ScreenDump {
unsigned char * rgb;
public:
- ScreenDump(GipfelWidget *gipf);
+ ScreenDump(Fl_Widget *widget);
~ScreenDump();
int save(OutputImage *out);
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++) {