graphic.d.ts 785 B

12345678910111213141516171819
  1. import Displayable 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?: string;
  15. batchStroke?: string;
  16. lastDrawType?: number;
  17. };
  18. export declare function brushSingle(ctx: CanvasRenderingContext2D, el: Displayable): void;
  19. export declare function brush(ctx: CanvasRenderingContext2D, el: Displayable, scope: BrushScope, isLast: boolean): void;