mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 08:58:23 +02:00
LazReport: Fix illegal set conversion
This commit is contained in:
parent
ed9974287b
commit
1b3e5ae738
@ -90,6 +90,15 @@ const
|
||||
PDFEscx = 0.792553191;
|
||||
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);
|
||||
|
||||
function CreateShape(ShapeClass: TPRShapeClass): TPRShape;
|
||||
@ -117,7 +126,7 @@ begin
|
||||
frstRoundRect:
|
||||
with TPRRect(CreateShape(TPRRect)) do begin
|
||||
Radius := Data.Radius;
|
||||
SquaredCorners := TPdfCorners(Data.Corners);
|
||||
SquaredCorners := CornerSetToPdfCorners(Data.Corners);
|
||||
GradientColor := Data.GradientColor;
|
||||
GradientDirection := Data.GradientDirection;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user