Skip to main content
Version: 1.0.0-preview.34

Velaptor.Graphics.CornerRadius

Velaptor

Velaptor.Graphics

CornerRadius Struct

Holds all of 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 bottomLeft, float bottomRight, float topRight);

Parameters

topLeft System.Single

The top left corner radius.

bottomLeft System.Single

The bottom left corner radius.

bottomRight System.Single

The bottom right corner radius.

topRight System.Single

The top right 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

System.Single

BottomRight

Gets the bottom right corner radius.

public float BottomRight { get; set; }

Property Value

System.Single

TopLeft

Gets the top left corner radius.

public float TopLeft { get; set; }

Property Value

System.Single

TopRight

Gets the top right corner radius.

public float TopRight { get; set; }

Property Value

System.Single

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.