project/node_modules/zrender/lib/graphic/Gradient.d.ts

24 lines
585 B
TypeScript
Raw Normal View History

2024-07-14 15:48:34 +08:00
export interface GradientObject {
id?: number;
type: string;
colorStops: GradientColorStop[];
global?: boolean;
}
export interface InnerGradientObject extends GradientObject {
__canvasGradient: CanvasGradient;
__width: number;
__height: number;
}
export interface GradientColorStop {
offset: number;
color: string;
}
export default class Gradient {
id?: number;
type: string;
colorStops: GradientColorStop[];
global: boolean;
constructor(colorStops: GradientColorStop[]);
addColorStop(offset: number, color: string): void;
}