Fix error in Fl_PostScript_File_Device::begin_page() under Pango

This fixes the bug reported in fltk.general "Fl_Printer bug?"
This commit is contained in:
ManoloFLTK 2024-03-30 17:21:11 +01:00
parent b4b98c5d57
commit 1bc5680472
1 changed files with 1 additions and 1 deletions

View File

@ -1645,6 +1645,7 @@ int Fl_PostScript_File_Device::begin_page (void)
char feature[200];
snprintf(feature, 200, "%%%%PageOrientation: %s", ps->pw_ > ps->ph_ ? "Landscape" : "Portrait");
cairo_ps_surface_dsc_comment(cairo_get_target(ps->cr()), feature);
cairo_save(ps->cr());
if (ps->pw_ > ps->ph_) {
cairo_translate(ps->cr(), 0, ps->pw_);
cairo_rotate(ps->cr(), -M_PI/2);
@ -1654,7 +1655,6 @@ int Fl_PostScript_File_Device::begin_page (void)
cairo_set_source_rgb(ps->cr(), 1.0, 1.0, 1.0); // white background
cairo_save(ps->cr());
cairo_save(ps->cr());
cairo_save(ps->cr());
ps->check_status();
#else
ps->page(ps->page_format_);