mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 15:49:27 +02:00
LCL: fixed PolyBezier with Continuous=true
git-svn-id: trunk@23012 -
This commit is contained in:
parent
aa8954efd5
commit
463fa5e609
@ -52,8 +52,8 @@ procedure Angles2Coords(X,Y, Width, Height : Integer;
|
||||
procedure Arc2Bezier(X, Y, Width, Height : Longint; Angle1, Angle2,
|
||||
Rotation : Extended; var Points : TBezier);
|
||||
|
||||
function Bezier(const C1,C2,C3,C4 : TFloatPoint): TBezier; Overload;
|
||||
function Bezier(const C1,C2,C3,C4 : TPoint): TBezier; Overload;
|
||||
function Bezier(const C1,C2,C3,C4 : TFloatPoint): TBezier; Overload; inline;
|
||||
function Bezier(const C1,C2,C3,C4 : TPoint): TBezier; Overload; inline;
|
||||
|
||||
procedure Bezier2Polyline(const Bezier : TBezier; var Points : PPoint;
|
||||
var Count : Longint);
|
||||
@ -865,15 +865,15 @@ begin
|
||||
end;
|
||||
If Not Continuous then begin
|
||||
NB := BCount;
|
||||
NB := Floor(NB div 4);
|
||||
NB := NB div 4;
|
||||
For I := 0 to NB - 1 do
|
||||
Bezier2PolyLine(Bezier(Beziers[I*4],Beziers[I*4+1],
|
||||
Beziers[I*4+2],Beziers[I*4+3]), Points, Count);
|
||||
end
|
||||
else begin
|
||||
NB := BCount - 1;
|
||||
NB := Floor(NB div 3);
|
||||
For I := 0 to NB do
|
||||
NB := NB div 3;
|
||||
For I := 0 to NB-1 do
|
||||
Bezier2PolyLine(Bezier(Beziers[(I - 1)*3 + 3],Beziers[I*3 + 1],
|
||||
Beziers[I*3+2],Beziers[I*3+3]), Points, Count);
|
||||
end;
|
||||
|
@ -745,8 +745,8 @@ end;
|
||||
starting point, the first and second points being used as its control points,
|
||||
and the third point its end-point. If the continous flag is set to FALSE,
|
||||
then each subsequent Curve requires 4 additional points, which are used
|
||||
excatly as in the first curve. Any additonal points which do not add up to
|
||||
a full bezier(4 for Continuous, 3 otherwise) are ingored. There must be at
|
||||
exactly as in the first curve. Any additonal points which do not add up to
|
||||
a full bezier(4 for Continuous, 3 otherwise) are ignored. There must be at
|
||||
least 4 points for an drawing to occur. If the Filled Flag is set to TRUE
|
||||
then the resulting Poly-Bézier will be drawn as a Polygon.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user