register.d.ts 437 B

123456789101112131415
  1. import { SimpleBBox } from '../types';
  2. import { IShape } from '../interfaces';
  3. declare type BoxMethod = (shape: IShape) => SimpleBBox;
  4. /**
  5. * 注册计算包围盒的算法
  6. * @param type 方法名
  7. * @param method 方法
  8. */
  9. export declare function register(type: string, method: BoxMethod): void;
  10. /**
  11. * 获取计算包围盒的算法
  12. * @param type 方法名
  13. */
  14. export declare function getMethod(type: string): BoxMethod;
  15. export {};