Function
linear
function linear(stops: StopInput[], options?: Omit<LinearGradientOptions, "stops">): LinearGradient;
Linear gradient. from / to default to top and bottom of the shape’s box (units: 'shape').
Parameters#
| Parameter | Type |
|---|---|
stops | StopInput[] |
options | Omit<LinearGradientOptions, "stops"> |
Returns#
Example#
g.roundRect(0, 0, 200, 60, 16).fill(linear([0x0a84ff, 0xbf5af2], { from: [0, 0], to: [1, 1] }));