Skip to content

Ellipse

Summary

Represents the ellipse shape.

Signature

1
public class Ellipse : Shape

Namespace

cAlgo.API

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
30
31
32
33
34
35
36
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample shows how to draw an ellipse shape on your chart
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class EllipseShapeSample : Indicator
     {
         protected override void Initialize()
         {
             var ellipse = new Ellipse
             {
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
                 Margin = 5,
                 Width = 100,
                 Height = 200,
                 StrokeColor = Color.Black,
                 FillColor = Color.Aqua,
                 StrokeThickness = 2,
                 StrokeStartLineCap = PenLineCap.Square,
                 Left = 100,
                 Top = 50
             };
             var canvas = new Canvas
             {
                 BackgroundColor = Color.Gold,
                 Opacity = 0.5
             };
             canvas.AddChild(ellipse);
             Chart.AddControl(canvas);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

Last update: July 1, 2022

Comments