Painter.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import Displayable from '../graphic/Displayable';
  2. import Storage from '../Storage';
  3. import { PainterBase } from '../PainterBase';
  4. interface SVGPainterOption {
  5. width?: number | string;
  6. height?: number | string;
  7. }
  8. declare class SVGPainter implements PainterBase {
  9. type: string;
  10. root: HTMLElement;
  11. storage: Storage;
  12. private _opts;
  13. private _svgDom;
  14. private _svgRoot;
  15. private _backgroundRoot;
  16. private _backgroundNode;
  17. private _gradientManager;
  18. private _patternManager;
  19. private _clipPathManager;
  20. private _shadowManager;
  21. private _viewport;
  22. private _visibleList;
  23. private _width;
  24. private _height;
  25. constructor(root: HTMLElement, storage: Storage, opts: SVGPainterOption, zrId: number);
  26. getType(): string;
  27. getViewportRoot(): HTMLDivElement;
  28. getSvgDom(): SVGElement;
  29. getSvgRoot(): SVGGElement;
  30. getViewportRootOffset(): {
  31. offsetLeft: number;
  32. offsetTop: number;
  33. };
  34. refresh(): void;
  35. setBackgroundColor(backgroundColor: string): void;
  36. createSVGElement(tag: string): SVGElement;
  37. paintOne(el: Displayable): SVGElement;
  38. _paintList(list: Displayable[]): void;
  39. resize(width: number | string, height: number | string): void;
  40. getWidth(): number;
  41. getHeight(): number;
  42. dispose(): void;
  43. clear(): void;
  44. toDataURL(): string;
  45. refreshHover: () => void;
  46. configLayer: (zlevel: number, config: import("../core/types").Dictionary<any>) => void;
  47. }
  48. export default SVGPainter;