mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-01 08:19:00 +02:00
LCL: Fix Delphi compatibility of PolyBezier (default value of Continuous argument). Issue #36442, patch by CudaText man).
git-svn-id: trunk@62404 -
This commit is contained in:
parent
6a3024178c
commit
07e7174b8d
@ -1105,10 +1105,10 @@ type
|
||||
StartX,StartY,EndX,EndY: Integer); virtual;
|
||||
procedure PolyBezier(Points: PPoint; NumPts: Integer;
|
||||
Filled: boolean = False;
|
||||
Continuous: boolean = False); virtual; {$IFDEF HasFPCanvas1}reintroduce;{$ENDIF}
|
||||
Continuous: boolean = True); virtual; {$IFDEF HasFPCanvas1}reintroduce;{$ENDIF}
|
||||
procedure PolyBezier(const Points: array of TPoint;
|
||||
Filled: boolean = False;
|
||||
Continuous: boolean = False); {$IFDEF HasFPCanvas1}reintroduce;{$ENDIF}
|
||||
Continuous: boolean = True); {$IFDEF HasFPCanvas1}reintroduce;{$ENDIF}
|
||||
procedure Polygon(const Points: array of TPoint;
|
||||
Winding: Boolean;
|
||||
StartIndex: Integer = 0;
|
||||
|
@ -834,22 +834,25 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCanvas.PolyBezier(const Points: array of TPoint;
|
||||
Filled: boolean = False;
|
||||
Continuous: boolean = False);
|
||||
Continuous: boolean = True);
|
||||
var NPoints, i: integer;
|
||||
PointArray: ^TPoint;
|
||||
begin
|
||||
NPoints:=High(Points)-Low(Points)+1;
|
||||
if NPoints<=0 then exit;
|
||||
if NPoints<4 then exit; // Curve must have at least 4 points
|
||||
GetMem(PointArray,SizeOf(TPoint)*NPoints);
|
||||
for i:=0 to NPoints-1 do
|
||||
PointArray[i]:=Points[i+Low(Points)];
|
||||
PolyBezier(PointArray, NPoints, Filled, Continuous);
|
||||
FreeMem(PointArray);
|
||||
try
|
||||
for i:=0 to NPoints-1 do
|
||||
PointArray[i]:=Points[i+Low(Points)];
|
||||
PolyBezier(PointArray, NPoints, Filled, Continuous);
|
||||
finally
|
||||
FreeMem(PointArray);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCanvas.PolyBezier(Points: PPoint; NumPts: Integer;
|
||||
Filled: boolean = False;
|
||||
Continuous: boolean = False);
|
||||
Continuous: boolean = True);
|
||||
begin
|
||||
Changing;
|
||||
RequiredState([csHandleValid, csBrushValid, csPenValid]);
|
||||
|
Loading…
Reference in New Issue
Block a user