Summary
Draws a polygon, which is a connected series of lines that form a closed shape.
Syntax
public class Polygon : Shape
Members
Name | Type | Summary |
---|---|---|
FillRule | Property | Gets or sets a FillRule enumeration that specifies how the interior fill of the shape is determined. |
Points | Property | Gets or sets a collection that contains the vertex points of the polygon. |
Polygon | Method | Initializes a new instance of the Polygon class. |
Example 1
using cAlgo.API; namespace cAlgo { // This sample shows how to draw a Polygon [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class PolygonSample : Indicator { protected override void Initialize() { Chart.AddControl(new Polygon { FillColor = Color.Red, Width = 200, Height = 100, Margin = 10, Points = new Point[] { new Point(100, 100), new Point(200, 50), new Point(300, 100), new Point(100, 100), } }); } public override void Calculate(int index) { } } }