Gradient.d.ts 542 B

123456789101112131415161718192021
  1. export interface GradientObject {
  2. id?: number;
  3. type: string;
  4. colorStops: GradientColorStop[];
  5. global?: boolean;
  6. }
  7. export interface InnerGradientObject extends GradientObject {
  8. __canvasGradient: CanvasGradient;
  9. }
  10. export interface GradientColorStop {
  11. offset: number;
  12. color: string;
  13. }
  14. export default class Gradient {
  15. id?: number;
  16. type: string;
  17. colorStops: GradientColorStop[];
  18. global: boolean;
  19. constructor(colorStops: GradientColorStop[]);
  20. addColorStop(offset: number, color: string): void;
  21. }