Author: manolo
Date: 2011-07-13 07:15:50 -0700 (Wed, 13 Jul 2011)
New Revision: 8858
Log:
Under X11, allow to call printable_rect() before any start_page() call.

Modified:
   branches/branch-1.3/src/Fl_PostScript.cxx

Modified: branches/branch-1.3/src/Fl_PostScript.cxx
===================================================================
--- branches/branch-1.3/src/Fl_PostScript.cxx   2011-07-13 09:09:08 UTC (rev 
8857)
+++ branches/branch-1.3/src/Fl_PostScript.cxx   2011-07-13 14:15:50 UTC (rev 
8858)
@@ -548,6 +548,13 @@
     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 @@
   }
   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(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;
 }
 

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to