mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 01:59:12 +02:00
LazReport: Fix illegal set conversion
This commit is contained in:
parent
ed9974287b
commit
1b3e5ae738
@ -90,6 +90,15 @@ const
|
|||||||
PDFEscx = 0.792553191;
|
PDFEscx = 0.792553191;
|
||||||
PDFEscy = 0.785447761;
|
PDFEscy = 0.785447761;
|
||||||
|
|
||||||
|
function CornerSetToPdfCorners(cs: TCornerSet): TPdfCorners;
|
||||||
|
begin
|
||||||
|
result := [];
|
||||||
|
if ctTopLeft in cs then Include(result, pcTopLeft);
|
||||||
|
if ctBottomLeft in cs then Include(result, pcBottomLeft);
|
||||||
|
if ctBottomRight in cs then Include(result, pcBottomRight);
|
||||||
|
if ctTopRight in cs then Include(result, pcTopRight);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrTNPDFExportFilter.AddShape(Data: TShapeData; x, y, h, w: integer);
|
procedure TfrTNPDFExportFilter.AddShape(Data: TShapeData; x, y, h, w: integer);
|
||||||
|
|
||||||
function CreateShape(ShapeClass: TPRShapeClass): TPRShape;
|
function CreateShape(ShapeClass: TPRShapeClass): TPRShape;
|
||||||
@ -117,7 +126,7 @@ begin
|
|||||||
frstRoundRect:
|
frstRoundRect:
|
||||||
with TPRRect(CreateShape(TPRRect)) do begin
|
with TPRRect(CreateShape(TPRRect)) do begin
|
||||||
Radius := Data.Radius;
|
Radius := Data.Radius;
|
||||||
SquaredCorners := TPdfCorners(Data.Corners);
|
SquaredCorners := CornerSetToPdfCorners(Data.Corners);
|
||||||
GradientColor := Data.GradientColor;
|
GradientColor := Data.GradientColor;
|
||||||
GradientDirection := Data.GradientDirection;
|
GradientDirection := Data.GradientDirection;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user