Summary
Represents the radii of a rectangle's corners.
Syntax
public sealed struct CornerRadius : ValueType
Members
Name | Type | Summary |
---|---|---|
BottomLeft | Property | Gets or sets the radius of the bottom-left corner. |
BottomRight | Property | Gets or sets the radius of the bottom-right corner. |
CornerRadius | Method | Initializes a new instance of the CornerRadius structure. |
Equals | Method | Defines whether the specified object is equal to this instance. |
GetHashCode | Method | Returns the hash code for this instance. |
TopLeft | Property | Gets or sets the radius of the top-left corner. |
TopRight | Property | Gets or sets the radius of the top-right corner. |
Example 1
using cAlgo.API; namespace cAlgo { // This sample indicator shows how to use the rectangle corner radius to create a round corner rectangle [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class RectangleCornerRadiusSample : Indicator { protected override void Initialize() { var rectangle = new Rectangle { RadiusX = 20, RadiusY = 20, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, Width = 200, Height = 150, FillColor = Color.FromArgb(100, Color.Red), StrokeColor = Color.Yellow }; Chart.AddControl(rectangle); } public override void Calculate(int index) { } } }