Interface IGradientBuilder
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
Returns
Linear()
Makes the gradient linear, running along the angle set by WithAngle(float).
IGradientBuilder Linear()
Returns
Radial()
Makes the gradient radial, spreading out from the center set by WithCenter(int, int).
IGradientBuilder Radial()
Returns
WithAngle(float)
Sets the direction of a linear gradient, in degrees.
IGradientBuilder WithAngle(float angle)
Parameters
anglefloat
Returns
WithCenter(int, int)
Centre of a radial gradient, as percentages of the target: (50, 50) is the middle.
IGradientBuilder WithCenter(int x, int y)