Table of Contents

Interface IGradientBuilder

Namespace
BSGameLib.UI.Builder
Assembly
BSGameLib.UI.dll

A Gradient resource: a linear or radial fill with its color stops.

public interface IGradientBuilder

Methods

AddStop(float, string)

Adds a color stop at offset, from 0 to 1 along the gradient.

IGradientBuilder AddStop(float offset, string colorHex)

Parameters

offset float
colorHex string

Returns

IGradientBuilder

Linear()

Makes the gradient linear, running along the angle set by WithAngle(float).

IGradientBuilder Linear()

Returns

IGradientBuilder

Radial()

Makes the gradient radial, spreading out from the center set by WithCenter(int, int).

IGradientBuilder Radial()

Returns

IGradientBuilder

WithAngle(float)

Sets the direction of a linear gradient, in degrees.

IGradientBuilder WithAngle(float angle)

Parameters

angle float

Returns

IGradientBuilder

WithCenter(int, int)

Centre of a radial gradient, as percentages of the target: (50, 50) is the middle.

IGradientBuilder WithCenter(int x, int y)

Parameters

x int
y int

Returns

IGradientBuilder