Namespace: SpawnDev.SpawnJS.JSObjects
Inherits: SpawnJSObject
Source: JSObjects/CanvasGradient.cs
MDN Reference: CanvasGradient on MDN
The CanvasGradient interface represents an opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient(), CanvasRenderingContext2D.createConicGradient() or CanvasRenderingContext2D.createRadialGradient(). https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient
| Method | Return Type | Description |
|---|---|---|
AddColorStop(double offset, string color) |
void |
The CanvasGradient.addColorStop() method of the Canvas 2D API adds a new color stop, defined by an offset and a color, to a given canvas gradient. A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end. A CSS <color> value representing the color of the stop. |