PainterBase.d.ts 797 B

123456789101112131415161718192021222324
  1. import { GradientObject } from './graphic/Gradient';
  2. import { PatternObject } from './graphic/Pattern';
  3. import { Dictionary } from './core/types';
  4. export interface PainterBase {
  5. type: string;
  6. root?: HTMLElement;
  7. ssrOnly?: boolean;
  8. resize(width?: number | string, height?: number | string): void;
  9. refresh(): void;
  10. clear(): void;
  11. renderToString?(): string;
  12. getType: () => string;
  13. getWidth(): number;
  14. getHeight(): number;
  15. dispose(): void;
  16. getViewportRoot: () => HTMLElement;
  17. getViewportRootOffset: () => {
  18. offsetLeft: number;
  19. offsetTop: number;
  20. };
  21. refreshHover(): void;
  22. configLayer(zlevel: number, config: Dictionary<any>): void;
  23. setBackgroundColor(backgroundColor: string | GradientObject | PatternObject): void;
  24. }