Constructors
Properties
Methods
addColorPoints
- addColorPoints(...colorPoints): Gradient
Parameters
Rest
...colorPoints: {
color: string;
position: number;
}[]
setPoints
- setPoints(...points): Gradient
Parameters
Rest
...points: {
x: number;
y: number;
}[]
setType
- setType(type): Gradient
Parameters
- type: "linear" | "radial" | "conic"
toJSON
- toJSON(): {
colorPoints: {
color: string;
position: number;
}[];
gradientType: string;
points: {
x: number;
y: number;
}[];
radius: number;
startAngle: number;
structureType: string;
type: string;
toJSON(): LazyCanvasGradient;
} Returns {
colorPoints: {
color: string;
position: number;
}[];
gradientType: string;
points: {
x: number;
y: number;
}[];
radius: number;
startAngle: number;
structureType: string;
type: string;
toJSON(): LazyCanvasGradient;
}
colorPoints: {
color: string;
position: number;
}[]
gradientType: string
points: {
x: number;
y: number;
}[]
radius: number
startAngle: number
structureType: string
type: string
toJSON:function
Example