From 6d17acaf22cf2281ec4965be59e15660749c34ed Mon Sep 17 00:00:00 2001 From: jesusr Date: Tue, 21 Jun 2016 20:04:57 +0000 Subject: [PATCH] PowerPDF: fix pdf output of TPRRect, TPREllipse and TPRImage when compiling with FPC trunk 3.1.1 and Fixes 3.0.1 (it affects LazReport pdf export when using PowerPDF exporter, objects appear without frames or background, etc.) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4795 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/powerpdf/PReport.pas | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/components/powerpdf/PReport.pas b/components/powerpdf/PReport.pas index 2f0b6dc81..b616bfde3 100644 --- a/components/powerpdf/PReport.pas +++ b/components/powerpdf/PReport.pas @@ -2307,17 +2307,17 @@ begin with ARect do begin Top := PageHeight - Top; - if Height > 1 then + if self.Height > 1 then Bottom := PageHeight - Bottom + 1 else Bottom := PageHeight - Bottom; - if Width > 1 then + if self.Width > 1 then Right := Right - 1; - if (Height <= 1) and (Width <= 1) then Exit; + if (self.Height <= 1) and (self.Width <= 1) then Exit; if (LineColor = clNone) or (LineStyle = psClear) then - if (Height <= 1) or (Width <= 1) then Exit; + if (self.Height <= 1) or (self.Width <= 1) then Exit; SetDash(ACanvas.PdfCanvas, FLineStyle); @@ -2392,17 +2392,17 @@ begin with ARect do begin Top := PageHeight - Top; - if Height > 1 then + if self.Height > 1 then Bottom := PageHeight - Bottom + 1 else Bottom := PageHeight - Bottom; - if Width > 1 then + if self.Width > 1 then Right := Right - 1; - if (Height <= 1) and (Width <= 1) then Exit; + if (self.Height <= 1) and (self.Width <= 1) then Exit; if (LineColor = clNone) or (LineStyle = psClear) then - if (Height <= 1) or (Width <= 1) then Exit; + if (self.Height <= 1) or (self.Width <= 1) then Exit; SetDash(ACanvas.PdfCanvas, FLineStyle); @@ -2493,8 +2493,8 @@ begin end; with ARect, ACanvas.PdfCanvas do if FStretch then begin - AWidth := Width; - AHeight := Height; + AWidth := self.Width; + AHeight := self.Height; if FProportional then CalcProportionalBounds(AWidth, AHeight); DrawXObject(Left, GetPage.Height - Top - AHeight, AWidth, AHeight, FXObjectName) @@ -2503,7 +2503,7 @@ begin WidthF := FPicture.Width * ScaleX; HeightF := FPicture.Height * ScaleY; DrawXObjectEx(Left, GetPage.Height - Top - HeightF, WidthF, HeightF, - Left, GetPage.Height - Top - Height, Width, Height, FXObjectName); + Left, GetPage.Height - Top - self.Height, self.Width, self.Height, FXObjectName); end; end;