interfaces.ts 643 B

123456789101112131415161718192021222324252627
  1. import { IElement as IBaseElement, IGroup as IBaseGroup, IShape as IBaseShape } from '@antv/g-base';
  2. import Defs from './defs';
  3. // 导出 g-base 中的 interfaces
  4. export * from '@antv/g-base';
  5. export interface IElement extends IBaseElement {
  6. /**
  7. * 裁剪和绘制图形元素
  8. * @param {Defs} context 上下文
  9. */
  10. draw(context: Defs, targetAttrs?);
  11. }
  12. export interface IGroup extends IBaseGroup {
  13. /**
  14. * 创建分组容器,对应 <g> 元素
  15. * @return {SVGGElement} 分组容器
  16. */
  17. createDom(): SVGGElement;
  18. }
  19. export interface IShape extends IBaseShape {
  20. type: string;
  21. canFill: boolean;
  22. canStroke: boolean;
  23. }