Skip to content

Gradient

interludesoftware.tick

Interlude.Tick

Gradient Struct

Describes a color gradient for use with Fill and FillRounded. Supports up to 4 color stops and three types: Linear (any angle), Radial (center outward), and Box (Chebyshev distance from center). Create via the static factory methods rather than the constructor.

public struct Gradient

Fields

Gradient.Angle Field

Angle in degrees for Linear gradients. 0 = top to bottom, 90 = left to right.

public float Angle;

Field Value

System.Single

Methods

Gradient.Box(Color, Color) Method

Creates a two-stop box (Chebyshev-distance) gradient from inner to outer.

public static Interlude.Tick.Gradient Box(Color inner, Color outer);

Parameters

inner UnityEngine.Color

outer UnityEngine.Color

Returns

Gradient

Gradient.Box(GradientStop, GradientStop) Method

Creates a two-stop box gradient using explicit GradientStop positions.

public static Interlude.Tick.Gradient Box(Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1);

Parameters

s0 GradientStop

s1 GradientStop

Returns

Gradient

Gradient.Box(GradientStop, GradientStop, GradientStop) Method

Creates a three-stop box gradient.

public static Interlude.Tick.Gradient Box(Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1, Interlude.Tick.GradientStop s2);

Parameters

s0 GradientStop

s1 GradientStop

s2 GradientStop

Returns

Gradient

Gradient.Box(GradientStop, GradientStop, GradientStop, GradientStop) Method

Creates a four-stop box gradient.

public static Interlude.Tick.Gradient Box(Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1, Interlude.Tick.GradientStop s2, Interlude.Tick.GradientStop s3);

Parameters

s0 GradientStop

s1 GradientStop

s2 GradientStop

s3 GradientStop

Returns

Gradient

Gradient.Horizontal(Color, Color) Method

Creates a horizontal linear gradient from left to right.

public static Interlude.Tick.Gradient Horizontal(Color left, Color right);

Parameters

left UnityEngine.Color

right UnityEngine.Color

Returns

Gradient

Gradient.Linear(float, Color, Color) Method

Creates a two-stop linear gradient at the given angle in degrees.

public static Interlude.Tick.Gradient Linear(float angleDeg, Color from, Color to);

Parameters

angleDeg System.Single

from UnityEngine.Color

to UnityEngine.Color

Returns

Gradient

Gradient.Linear(float, GradientStop, GradientStop) Method

Creates a two-stop linear gradient at the given angle using explicit GradientStop positions.

public static Interlude.Tick.Gradient Linear(float angleDeg, Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1);

Parameters

angleDeg System.Single

s0 GradientStop

s1 GradientStop

Returns

Gradient

Gradient.Linear(float, GradientStop, GradientStop, GradientStop) Method

Creates a three-stop linear gradient at the given angle.

public static Interlude.Tick.Gradient Linear(float angleDeg, Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1, Interlude.Tick.GradientStop s2);

Parameters

angleDeg System.Single

s0 GradientStop

s1 GradientStop

s2 GradientStop

Returns

Gradient

Gradient.Linear(float, GradientStop, GradientStop, GradientStop, GradientStop) Method

Creates a four-stop linear gradient at the given angle.

public static Interlude.Tick.Gradient Linear(float angleDeg, Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1, Interlude.Tick.GradientStop s2, Interlude.Tick.GradientStop s3);

Parameters

angleDeg System.Single

s0 GradientStop

s1 GradientStop

s2 GradientStop

s3 GradientStop

Returns

Gradient

Gradient.Radial(Color, Color) Method

Creates a two-stop radial gradient from inner at the center to outer at the edge.

public static Interlude.Tick.Gradient Radial(Color inner, Color outer);

Parameters

inner UnityEngine.Color

outer UnityEngine.Color

Returns

Gradient

Gradient.Radial(GradientStop, GradientStop) Method

Creates a two-stop radial gradient using explicit GradientStop positions.

public static Interlude.Tick.Gradient Radial(Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1);

Parameters

s0 GradientStop

s1 GradientStop

Returns

Gradient

Gradient.Radial(GradientStop, GradientStop, GradientStop) Method

Creates a three-stop radial gradient.

public static Interlude.Tick.Gradient Radial(Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1, Interlude.Tick.GradientStop s2);

Parameters

s0 GradientStop

s1 GradientStop

s2 GradientStop

Returns

Gradient

Gradient.Radial(GradientStop, GradientStop, GradientStop, GradientStop) Method

Creates a four-stop radial gradient.

public static Interlude.Tick.Gradient Radial(Interlude.Tick.GradientStop s0, Interlude.Tick.GradientStop s1, Interlude.Tick.GradientStop s2, Interlude.Tick.GradientStop s3);

Parameters

s0 GradientStop

s1 GradientStop

s2 GradientStop

s3 GradientStop

Returns

Gradient

Gradient.Solid(Color) Method

Creates a single-color gradient.

public static Interlude.Tick.Gradient Solid(Color color);

Parameters

color UnityEngine.Color

Returns

Gradient

Gradient.Vertical(Color, Color) Method

Creates a vertical linear gradient from top to bottom.

public static Interlude.Tick.Gradient Vertical(Color top, Color bottom);

Parameters

top UnityEngine.Color

bottom UnityEngine.Color

Returns

Gradient