summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/device.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/device.cxx b/test/device.cxx
index 154bdb844..8b04e53d2 100644
--- a/test/device.cxx
+++ b/test/device.cxx
@@ -617,7 +617,12 @@ void copy(Fl_Widget *, void *data) {
}
if (!err) {
p->begin_page();
- if (target->as_window()) p->print_window(target->as_window());
+ if (target->as_window()) {
+ int w, h;
+ p->printable_rect(&w, &h);
+ p->origin(w/2, h/2);
+ p->print_window(target->as_window(), -target->w()/2, -target->h()/2);
+ }
else p->print_widget(target);
p->end_page();
p->end_job();
@@ -646,10 +651,8 @@ void copy(Fl_Widget *, void *data) {
if (p.file()) {
if (target->as_window()) p.draw_decorated_window(target->as_window());
else p.draw(target);
- //p.close();
}
}
- fclose(eps);
}
}