TAChart: Relax condition to close polygon for TPolygonSeries in case of single polygons.

git-svn-id: trunk@64386 -
This commit is contained in:
wp 2021-01-14 16:52:50 +00:00
parent 751852a44a
commit 78d7603454

View File

@ -134,6 +134,20 @@ begin
if nPoints = 0 then
exit;
// Single polygon --> we can use the standard Polygon() routine
if nStart = 1 then
begin
SetLength(FPoints, nPoints);
ADrawer.SetBrush(FBrush);
ADrawer.SetPen(FPen);
ADrawer.Polygon(FPoints, 0, Length(FPoints));
exit;
end;
// If we get here we have multiple polygons. We must add points for a
// "clean retreat" to the starting point, and then we fill the borderless
// polygon and draw the border separately.
// Use length of FStart array as last array element for easier calculation
SavePolygonStartIndex(nPoints);