GradientBuilderclass

Builds a gradient by value without allocating stop arrays. Add 2 to 8 stops before converting to Fill.

objectGradientBuilder
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.Fill.GradientBuilder

Methods2

Showing 2 methods

public Sandbox.Fill.GradientBuilder WithAngle(float degrees)PUBLIC

Returns a linear or conic gradient with an absolute clockwise angle in degrees from right. Radial gradients have no angle.

ParameterTypeDescription
degreesfloat
Returns:GradientBuilder

public Sandbox.Fill.GradientBuilder WithStop(float offset, Color color)PUBLIC

Returns a copy with another stop. Offsets are ordered in [0, 1]; equal offsets create hard transitions.

ParameterTypeDescription
offsetfloat
colorColor
Returns:GradientBuilder

On this page