Ellipse
class cAlgo.API
Represents the ellipse shape.
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 class Ellipse : Shape
Namespace: cAlgo.API · Group: Shapes · Inherits: Shape, ControlBase
Examples
using cAlgo.API;
namespace cAlgo
{
// This sample shows how to draw an ellipse shape on your chart
public partial 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)
{
}
}
}
import clr
clr.AddReference("cAlgo.API")
from cAlgo.API import *
class Test():
def initialize(self):
ellipse = Ellipse()
ellipse.HorizontalAlignment = HorizontalAlignment.Center
ellipse.VerticalAlignment = VerticalAlignment.Center
ellipse.Margin = Thickness(5)
ellipse.Width = 100
ellipse.Height = 200
ellipse.StrokeColor = Color.Black
ellipse.FillColor = Color.Aqua
ellipse.StrokeThickness = 2
ellipse.StrokeStartLineCap = PenLineCap.Square
ellipse.Left = 100
ellipse.Top = 50
canvas = Canvas()
canvas.BackgroundColor = Color.Gold
canvas.Opacity = 0.5
canvas.AddChild(ellipse)
api.Chart.AddControl(canvas)
{
"AccessRights": "None",
"TimeZone": "UTC",
"IsOverlay": true
}
Constructors
Inherited members
From Shape: StrokeColor, FillColor, StrokeThickness, Stretch, StrokeEndLineCap, StrokeStartLineCap, StrokeLineJoin, StrokeMiterLimit, StrokeDashArray, StrokeDashOffset, StrokeDashCap
From ControlBase: ResetProperty, UniqueId, Style, Left, Top, Right, Bottom, Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight, IsEnabled, IsVisible, Opacity, Margin, VerticalAlignment, HorizontalAlignment, Dock, IsHitTestVisible