From 2c9558520734c9ceda134eefccc9daf2803eb49f Mon Sep 17 00:00:00 2001 From: Jesus Reyes A Date: Thu, 8 Aug 2024 18:06:19 -0600 Subject: [PATCH] Lazreport : FclPDFExport > FillColor for View's, patch by Paweld, issue #41061 --- .../source/addons/lrFclPDFExport/lr_e_fclpdf.pas | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/components/lazreport/source/addons/lrFclPDFExport/lr_e_fclpdf.pas b/components/lazreport/source/addons/lrFclPDFExport/lr_e_fclpdf.pas index 05bd3ad177..38bd624b96 100644 --- a/components/lazreport/source/addons/lrFclPDFExport/lr_e_fclpdf.pas +++ b/components/lazreport/source/addons/lrFclPDFExport/lr_e_fclpdf.pas @@ -739,6 +739,9 @@ procedure TlrPdfExportFilter.DrawRect(X, Y, W, H: TPDFFloat; ABorderColor, var fX, fY, fW, fH: Extended; begin + if AFrames = [] then + ABorderColor := clNone; + if (AFillColor = clNone) and (ABorderColor = clNone) then exit; if ABorderColor <> clNone then @@ -753,9 +756,10 @@ begin fY:= ConvetUnits(Y); ABorderWidth:=ConvetUnits(ABorderWidth); - if AFrames = [frbLeft, frbTop, frbRight, frbBottom] then - FCurPage.DrawRect(fX, fY + fH, fW, fH, ABorderWidth, (AFillColor <> clNone), (ABorderColor <> clNone)) - else + if (AFrames = [frbLeft, frbTop, frbRight, frbBottom]) or (AFillColor <> clNone) then + FCurPage.DrawRect(fX, fY + fH, fW, fH, ABorderWidth, (AFillColor <> clNone), ((ABorderColor <> clNone) and (AFrames = [frbLeft, frbTop, frbRight, frbBottom]))); + + if not (AFrames = [frbLeft, frbTop, frbRight, frbBottom]) then begin if frbLeft in AFrames then FCurPage.DrawLine(fX, fY, fX, fY + fH, ABorderWidth); @@ -773,8 +777,7 @@ end; procedure TlrPdfExportFilter.DrawRectView(AView: TfrView); begin - if AView.Frames <> [] then - DrawRect(AView.Left, AView.Top, AView.Width, AView.Height, AView.FrameColor, AView.FillColor, AView.Frames, AView.FrameWidth); + DrawRect(AView.Left, AView.Top, AView.Width, AView.Height, AView.FrameColor, AView.FillColor, AView.Frames, AView.FrameWidth); end; procedure TlrPdfExportFilter.WriteURL(X, Y, W, H: TPDFFloat; AUrlText: string);