Skip to content

Polygon.Points

property · Polygon · cAlgo.API

DesktopCLICloud

Gets or sets a collection that contains the vertex points of the polygon.

Environment behaviour

CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Definition

public Point[] Points {get; set;}
polygon.Points: list[Point]

Returns Point[]

Examples

var polygon = new Polygon { FillColor = Color.Gold };
polygon.Points = new[] { new Point(0, 50), new Point(50, 0), new Point(100, 50), new Point(50, 100) };
Chart.AddControl(polygon);
Print("Vertex count: {0}", polygon.Points.Length);
polygon = Polygon()
polygon.FillColor = Color.Gold
polygon.Points = [Point(0, 50), Point(50, 0), Point(100, 50), Point(50, 100)]
api.Chart.AddControl(polygon)
api.Print(f"Vertex count: {len(polygon.Points)}")