Table of Contents

Struct GradientStop

Namespace
Xui.Core.Canvas
Assembly
Core.dll

Represents a single color stop in a gradient, defined by an offset and a color. Used for both linear and radial gradients.

public struct GradientStop
Inherited Members

Constructors

GradientStop(NFloat, uint)

Initializes a new GradientStop with a specified offset and packed RGBA color.

public GradientStop(NFloat offset, uint color)

Parameters

offset NFloat

Position of the color stop, usually from 0 to 1.

color uint

Color in packed 0xRRGGBBAA format.

GradientStop(NFloat, Color)

Initializes a new GradientStop with a specified offset and color.

public GradientStop(NFloat offset, Color color)

Parameters

offset NFloat

Position of the color stop, usually from 0 to 1.

color Color

Color at the given offset.

Fields

Color

The color at the specified offset.

public Color Color

Field Value

Color

Offset

The position of the stop within the gradient, typically in the range [0, 1].

public NFloat Offset

Field Value

NFloat

Operators

implicit operator GradientStop((NFloat Offset, uint Color))

Implicitly converts a tuple of NFloat and uint (0xRRGGBBAA) to a GradientStop.

public static implicit operator GradientStop((NFloat Offset, uint Color) pair)

Parameters

pair (NFloat Offset, uint Color)

A tuple containing offset and packed RGBA color.

Returns

GradientStop

implicit operator GradientStop((NFloat Offset, Color Color))

Implicitly converts a tuple of NFloat and Color to a GradientStop.

public static implicit operator GradientStop((NFloat Offset, Color Color) pair)

Parameters

pair (NFloat Offset, Color Color)

A tuple containing offset and color.

Returns

GradientStop