Summary
Represents the rectangle.
Syntax
public class Rectangle : Shape
Members
Name | Type | Summary |
---|---|---|
RadiusX | Property | Gets or sets the x-axis radius of the ellipse that is used to round the corners of the rectangle. |
RadiusY | Property | Gets or sets the y-axis radius of the ellipse that is used to round the corners of the rectangle. |
Rectangle | Method | Initializes a new instance of the Rectangle class. |
Example 1
using cAlgo.API; namespace cAlgo { // This sample shows how to use the Rectangle shape which is a chart control [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class RectangleShapeSample : Indicator { protected override void Initialize() { var stackPanel = new StackPanel { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, BackgroundColor = Color.Gold, Opacity = 0.6 }; var rectangle = new Rectangle { StrokeColor = Color.Blue, FillColor = Color.Red, StrokeThickness = 2, Margin = 10, Width = 300, Height = 100 }; stackPanel.AddChild(rectangle); Chart.AddControl(stackPanel); } public override void Calculate(int index) { } } }