graphic.d.ts 931 B

123456789101112131415161718192021
  1. import Displayable, { BeforeBrushParam } from '../graphic/Displayable';
  2. import { ImagePatternObject } from '../graphic/Pattern';
  3. import Path from '../graphic/Path';
  4. export declare function createCanvasPattern(this: void, ctx: CanvasRenderingContext2D, pattern: ImagePatternObject, el: {
  5. dirty: () => void;
  6. }): CanvasPattern;
  7. export declare type BrushScope = {
  8. inHover: boolean;
  9. viewWidth: number;
  10. viewHeight: number;
  11. prevElClipPaths?: Path[];
  12. prevEl?: Displayable;
  13. allClipped?: boolean;
  14. batchFill?: boolean;
  15. batchStroke?: boolean;
  16. lastDrawType?: number;
  17. beforeBrushParam: BeforeBrushParam;
  18. };
  19. export declare function brushSingle(ctx: CanvasRenderingContext2D, el: Displayable): void;
  20. export declare function brush(ctx: CanvasRenderingContext2D, el: Displayable, scope: BrushScope): void;
  21. export declare function brushLoopFinalize(ctx: CanvasRenderingContext2D, scope: BrushScope): void;