summaryrefslogtreecommitdiff
path: root/src/Fl_PostScript.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-07-13 14:15:50 +0000
committerManolo Gouy <Manolo>2011-07-13 14:15:50 +0000
commitada26bff297a24bcca8f48f0a0699a14c824d04a (patch)
tree65c1668ce02d0ee9582d2544fea3f381725163c9 /src/Fl_PostScript.cxx
parent67ca1ce41ccefba48072f41082d5c07261fec2d7 (diff)
Under X11, allow to call printable_rect() before any start_page() call.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_PostScript.cxx')
-rw-r--r--src/Fl_PostScript.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx
index 36bd2d6b1..22ff100c0 100644
--- a/src/Fl_PostScript.cxx
+++ b/src/Fl_PostScript.cxx
@@ -548,6 +548,13 @@ int Fl_PostScript_Graphics_Driver::start_postscript (int pagecount,
top_margin = 12;
}
page_format_ = (enum Fl_Paged_Device::Page_Format)(format | layout);
+ if (layout & Fl_Paged_Device::LANDSCAPE){
+ ph_ = Fl_Paged_Device::page_formats[format].width;
+ pw_ = Fl_Paged_Device::page_formats[format].height;
+ } else {
+ pw_ = Fl_Paged_Device::page_formats[format].width;
+ ph_ = Fl_Paged_Device::page_formats[format].height;
+ }
fputs("%!PS-Adobe-3.0\n", output);
fputs("%%Creator: FLTK\n", output);
@@ -648,8 +655,8 @@ void Fl_PostScript_Graphics_Driver::page(double pw, double ph, int media) {
}
fprintf(output, "%%%%EndPageSetup\n");
- pw_ = pw;
- ph_ = ph;
+/* pw_ = pw;
+ ph_ = ph;*/
reset();
fprintf(output, "save\n");
@@ -677,15 +684,13 @@ void Fl_PostScript_Graphics_Driver::page(double pw, double ph, int media) {
}
void Fl_PostScript_Graphics_Driver::page(int format){
-
-
- if(format & Fl_Paged_Device::LANDSCAPE){
+/* if(format & Fl_Paged_Device::LANDSCAPE){
ph_=Fl_Paged_Device::page_formats[format & 0xFF].width;
pw_=Fl_Paged_Device::page_formats[format & 0xFF].height;
}else{
pw_=Fl_Paged_Device::page_formats[format & 0xFF].width;
ph_=Fl_Paged_Device::page_formats[format & 0xFF].height;
- }
+ }*/
page(pw_,ph_,format & 0xFF00);//,orientation only;
}