View Issue Details

IDProjectCategoryView StatusLast Update
0032480FPCFCLpublic2017-09-27 13:29
ReporterGraeme GeldenhuysAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.1.1Product Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0032480: patch - fpreport FPImage export page orientation bug fix
DescriptionSame as the PDF exporter issue. Page.Orientation = Landscape was not correctly handled. Attached patch fixes the bug for the FPImage exporter.
TagsNo tags attached.
Fixed in Revision37331
FPCOldBugId
FPCTarget
Attached Files
  • 0001-fpReport-FPImage-exporter-fix-for-Page.Orientation-i.patch (1,357 bytes)
    From 0b38ea8d88e17d14a6b337bd66db1b6cd6410edd Mon Sep 17 00:00:00 2001
    From: Graeme Geldenhuys <graemeg@gmail.com>
    Date: Wed, 27 Sep 2017 12:18:56 +0100
    Subject: [PATCH] fpReport FPImage exporter fix for Page.Orientation if set to
     Landscape.
    
    ---
     packages/fcl-report/src/fpreportfpimageexport.pp | 12 ++++++++++--
     1 file changed, 10 insertions(+), 2 deletions(-)
    
    diff --git a/packages/fcl-report/src/fpreportfpimageexport.pp b/packages/fcl-report/src/fpreportfpimageexport.pp
    index 8205210415..5110439981 100644
    --- a/packages/fcl-report/src/fpreportfpimageexport.pp
    +++ b/packages/fcl-report/src/fpreportfpimageexport.pp
    @@ -249,8 +249,16 @@ procedure TFPReportExportfpImage.SetupPageRender(const APage: TFPReportPage);
       FreeAndNil(FCanvas);
       FreeAndNil(FHelper);
       FreeAndNil(FImage);
    -  FImageWidth := mmToPixels(APage.PageSize.Width);
    -  FImageHeight := mmToPixels(APage.PageSize.Height);
    +  if APage.Orientation = poLandscape then
    +  begin
    +    FImageWidth := mmToPixels(APage.PageSize.Height);
    +    FImageHeight := mmToPixels(APage.PageSize.Width);
    +  end
    +  else
    +  begin
    +    FImageWidth := mmToPixels(APage.PageSize.Width);
    +    FImageHeight := mmToPixels(APage.PageSize.Height);
    +  end;
       FImage:=CreateImage(FImageWidth,FImageHeight);
       FCanvas:=CreateCanvas(FImage);
       FHelper:=TFPReportCanvasHelper.Create(FCanvas,DPI);
    -- 
    2.13.1
    
    

Activities

Graeme Geldenhuys

2017-09-27 13:19

reporter  

0001-fpReport-FPImage-exporter-fix-for-Page.Orientation-i.patch (1,357 bytes)
From 0b38ea8d88e17d14a6b337bd66db1b6cd6410edd Mon Sep 17 00:00:00 2001
From: Graeme Geldenhuys <graemeg@gmail.com>
Date: Wed, 27 Sep 2017 12:18:56 +0100
Subject: [PATCH] fpReport FPImage exporter fix for Page.Orientation if set to
 Landscape.

---
 packages/fcl-report/src/fpreportfpimageexport.pp | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/packages/fcl-report/src/fpreportfpimageexport.pp b/packages/fcl-report/src/fpreportfpimageexport.pp
index 8205210415..5110439981 100644
--- a/packages/fcl-report/src/fpreportfpimageexport.pp
+++ b/packages/fcl-report/src/fpreportfpimageexport.pp
@@ -249,8 +249,16 @@ procedure TFPReportExportfpImage.SetupPageRender(const APage: TFPReportPage);
   FreeAndNil(FCanvas);
   FreeAndNil(FHelper);
   FreeAndNil(FImage);
-  FImageWidth := mmToPixels(APage.PageSize.Width);
-  FImageHeight := mmToPixels(APage.PageSize.Height);
+  if APage.Orientation = poLandscape then
+  begin
+    FImageWidth := mmToPixels(APage.PageSize.Height);
+    FImageHeight := mmToPixels(APage.PageSize.Width);
+  end
+  else
+  begin
+    FImageWidth := mmToPixels(APage.PageSize.Width);
+    FImageHeight := mmToPixels(APage.PageSize.Height);
+  end;
   FImage:=CreateImage(FImageWidth,FImageHeight);
   FCanvas:=CreateCanvas(FImage);
   FHelper:=TFPReportCanvasHelper.Create(FCanvas,DPI);
-- 
2.13.1

Michael Van Canneyt

2017-09-27 13:29

administrator   ~0103092

Applied, thanks

Issue History

Date Modified Username Field Change
2017-09-27 13:19 Graeme Geldenhuys New Issue
2017-09-27 13:19 Graeme Geldenhuys File Added: 0001-fpReport-FPImage-exporter-fix-for-Page.Orientation-i.patch
2017-09-27 13:29 Michael Van Canneyt Fixed in Revision => 37331
2017-09-27 13:29 Michael Van Canneyt Note Added: 0103092
2017-09-27 13:29 Michael Van Canneyt Status new => resolved
2017-09-27 13:29 Michael Van Canneyt Fixed in Version => 3.1.1
2017-09-27 13:29 Michael Van Canneyt Resolution open => fixed
2017-09-27 13:29 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-09-27 13:29 Michael Van Canneyt Target Version => 3.2.0