Velaptor.Graphics.CornerRadius
Velaptor
Velaptor.Graphics
CornerRadius Struct
Holds all the radius values for each corner of a rectangle.
public readonly struct CornerRadius :
System.IEquatable<Velaptor.Graphics.CornerRadius>
Implements System.IEquatable<CornerRadius>
Constructors
CornerRadius(float, float, float, float) Constructor
Initializes a new instance of the CornerRadius struct.
public CornerRadius(float topLeft, float topRight, float bottomRight, float bottomLeft);
Parameters
topLeft
System.Single
The top left corner radius.
topRight
System.Single
The top right corner radius.
bottomRight
System.Single
The bottom right corner radius.
bottomLeft
System.Single
The bottom left corner radius.
CornerRadius(float) Constructor
Initializes a new instance of the CornerRadius struct.
public CornerRadius(float value);
Parameters
value
System.Single
The value to set all corner radius values.
Properties
BottomLeft
Gets the bottom left corner radius.
public float BottomLeft { get; set; }
Property Value
BottomRight
Gets the bottom right corner radius.
public float BottomRight { get; set; }
Property Value
TopLeft
Gets the top left corner radius.
public float TopLeft { get; set; }
Property Value
TopRight
Gets the top right corner radius.
public float TopRight { get; set; }
Property Value
Methods
Empty()
Returns an empty CornerRadius instance.
public static Velaptor.Graphics.CornerRadius Empty();
Returns
CornerRadius
The empty instance.
IsEmpty()
Returns a value indicating if the CornerRadius is empty.
public bool IsEmpty();
Returns
System.Boolean
True if empty.
SetBottomLeft(CornerRadius, float)
Sets the bottom left corner value of the given cornerRadius to the given value.
public static Velaptor.Graphics.CornerRadius SetBottomLeft(Velaptor.Graphics.CornerRadius cornerRadius, float value);
Parameters
cornerRadius
CornerRadius
The corner radius to change.
value
System.Single
The value to set.
Returns
CornerRadius
The corner radius with the updated value.
SetBottomRight(CornerRadius, float)
Sets the bottom right corner value of the given cornerRadius to the given value.
public static Velaptor.Graphics.CornerRadius SetBottomRight(Velaptor.Graphics.CornerRadius cornerRadius, float value);
Parameters
cornerRadius
CornerRadius
The corner radius to change.
value
System.Single
The value to set.
Returns
CornerRadius
The corner radius with the updated value.
SetTopLeft(CornerRadius, float)
Sets the top left corner value of the given cornerRadius to the given value.
public static Velaptor.Graphics.CornerRadius SetTopLeft(Velaptor.Graphics.CornerRadius cornerRadius, float value);
Parameters
cornerRadius
CornerRadius
The corner radius to change.
value
System.Single
The value to set.
Returns
CornerRadius
The corner radius with the updated value.
SetTopRight(CornerRadius, float)
Sets the top right corner value of the given cornerRadius to the given value.
public static Velaptor.Graphics.CornerRadius SetTopRight(Velaptor.Graphics.CornerRadius cornerRadius, float value);
Parameters
cornerRadius
CornerRadius
The corner radius to change.
value
System.Single
The value to set.
Returns
CornerRadius
The corner radius with the updated value.