Skip to content

Polyline

Summary

Draws a series of connected straight lines.

Signature

1
public class Polyline : Shape

Namespace

cAlgo.API

Properties

Name Description
Points { get; set; } Gets or sets a collection that contains the vertex points of the Polyline.
FillRule { get; set; } Gets or sets a FillRule enumeration that specifies how the interior fill of the shape is determined.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample shows how to use Polyline to draw connected lines
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class PolylineSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.AddControl(new Polyline
             {
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
                 StrokeColor = Color.Red,
                 StrokeThickness = 1,
                 Points = new[]
                 {
                     new Point(10, 10),
                     new Point(100,200),
                     new Point(10, 100),
                     new Point(10, 10),
                 }
             });
         }
         public override void Calculate(int index)
         {
         }
     }
 }

Last update: December 5, 2022

Comments