interfaces.d.ts 640 B

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