Skip to content

CornerRadius

interludesoftware.tick

Interlude.Tick

CornerRadius Struct

public struct CornerRadius

Constructors

CornerRadius(float) Constructor

Creates a CornerRadius with all four corners set to radius.

public CornerRadius(float radius);

Parameters

radius System.Single

CornerRadius(float, float, float, float) Constructor

Creates a CornerRadius with explicit per-corner values.

public CornerRadius(float topLeft, float topRight, float bottomLeft, float bottomRight);

Parameters

topLeft System.Single

topRight System.Single

bottomLeft System.Single

bottomRight System.Single

Methods

CornerRadius.Clamp(float) Method

Returns a copy with every corner radius clamped to at most maxRadius. Pass half the shorter side of the target rect so the rounded-corner SDF stays well-formed.

public Interlude.Tick.CornerRadius Clamp(float maxRadius);

Parameters

maxRadius System.Single

Returns

CornerRadius

CornerRadius.ToVector4() Method

Returns the corner radii packed into a UnityEngine.Vector4 in shader order (BottomRight, TopRight, BottomLeft, TopLeft).

public Vector4 ToVector4();

Returns

UnityEngine.Vector4

Operators

CornerRadius.implicit operator CornerRadius(int) Operator

Implicitly converts an System.Int32 to a uniform CornerRadius.

public static Interlude.Tick.CornerRadius implicit operator Interlude.Tick.CornerRadius(int value);

Parameters

value System.Int32

Returns

CornerRadius