diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-10-28 17:19:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-28 17:19:05 +0100 |
| commit | 8accc6e8409819316fa296642c1d23e5638fcb2d (patch) | |
| tree | 33c6237919989f120f2179cb1e7b410cb7cdd01e /test | |
| parent | f718943e6fbcf89297e61466068405452d7f8ae6 (diff) | |
Pango ps (#148)
Use cairo-PostScript to output PostScript when pango is available.
This allows to draw in vectorial form any script.
Before, only the Latin script could be drawn to PostScript in vectorial form.
Diffstat (limited to 'test')
| -rw-r--r-- | test/device.cxx | 9 |
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); } } |
