CornerRadius constructor
constructor · CornerRadius · cAlgo.API
DesktopCLICloud
Initializes a new instance of the CornerRadius structure.
Overloads
| Signature |
|---|
CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft) |
CornerRadius(double uniformRadius) |
CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft)
Initializes a new instance of the CornerRadius structure.
public CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft)
CornerRadius(topLeft: float, topRight: float, bottomRight: float, bottomLeft: float)
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
topLeft | double | float | |
topRight | double | float | |
bottomRight | double | float | |
bottomLeft | double | float |
Examples
var button = new Button { Text = "Buy", CornerRadius = new CornerRadius(10, 10, 0, 0) };
Chart.AddControl(button);
Print("Top left radius: {0}", button.CornerRadius.TopLeft);
button = Button()
button.Text = "Buy"
button.CornerRadius = CornerRadius(10, 10, 0, 0)
api.Chart.AddControl(button)
api.Print(f"Top left radius: {button.CornerRadius.TopLeft}")
CornerRadius(double uniformRadius)
Initializes a new instance of the CornerRadius structure.
public CornerRadius(double uniformRadius)
CornerRadius(uniformRadius: float)
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
uniformRadius | double | float |
Examples
var border = new Border { CornerRadius = new CornerRadius(8), BorderThickness = 1, BorderColor = Color.Gray, Width = 200, Height = 80 };
Chart.AddControl(border);
border = Border()
border.CornerRadius = CornerRadius(8)
border.BorderThickness = Thickness(1)
border.BorderColor = Color.Gray
border.Width = 200
border.Height = 80
api.Chart.AddControl(border)