Przeglądaj źródła

* Patch from Graeme Geldenhuys (Bug ID 32478)
If page orientation was set to Landscape, the PDF exporter rendered the page from the bottom upwards.
This was because the page.Matrix was set up too early in the exporter.

git-svn-id: trunk@37330 -

michael 8 lat temu
rodzic
commit
710adec670
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      packages/fcl-report/src/fpreportpdfexport.pp

+ 4 - 3
packages/fcl-report/src/fpreportpdfexport.pp

@@ -717,13 +717,14 @@ begin
     end;  { case PaperName }
     pg.UnitOfMeasure := uomMillimeters; { report measurements are always in millimeter units }
 
+    // This must appear before configuring the pg.Matrix
+    if rpage.Orientation = poLandscape then
+      pg.Orientation := ppoLandscape;
+
     // Convert from the Cartesian coordinate system to the Screen coordinate system
     pg.Matrix.SetYScalation(-1);
     pg.Matrix.SetYTranslation(pg.GetPaperHeight);
 
-    if rpage.Orientation = poLandscape then
-      pg.Orientation := ppoLandscape;
-
     for b := 0 to (rpage.BandCount - 1) do
       begin
       rband := rpage.Bands[b];