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 /src/Fl_x.cxx | |
| 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 'src/Fl_x.cxx')
| -rw-r--r-- | src/Fl_x.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 947203679..31a76f4e9 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -3087,7 +3087,7 @@ void Fl_X11_Window_Driver::show() { } -//#define USE_PRINT_BUTTON 1 +#define USE_PRINT_BUTTON 1 #ifdef USE_PRINT_BUTTON // to test the Fl_Printer class creating a "Print front window" button in a separate window @@ -3112,6 +3112,7 @@ void printFront(Fl_Widget *o, void *data) scale = (float)w/ww; if ((float)h/wh < scale) scale = (float)h/wh; printer.scale(scale, scale); + printer.printable_rect(&w, &h); } // #define ROTATE 20.0 @@ -3120,11 +3121,12 @@ void printFront(Fl_Widget *o, void *data) printer.printable_rect(&w, &h); printer.origin(w/2, h/2 ); printer.rotate(ROTATE); - printer.print_widget( win, - win->w()/2, - win->h()/2 ); + printer.print_window( win, - win->w()/2, - win->h()/2); //printer.print_window_part( win, 0,0, win->w(), win->h(), - win->w()/2, - win->h()/2 ); #else - printer.print_window(win); - //printer.print_window_part( win, 0,0, win->w(), win->h(), 0,0 ); + printer.origin(w/2, h/2 ); + printer.print_window(win, -ww/2, -wh/2); + //printer.print_window_part( win, 0,0, win->w(), win->h(), -ww/2, -wh/2 ); #endif printer.end_page(); |
