zrender
Version:
A lightweight graphic library providing 2d draw for Apache ECharts
24 lines (23 loc) • 585 B
TypeScript
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;
}