shape.d.ts 693 B

12345678910111213141516171819202122
  1. import type { DisplayObject, Text, TextStyleProps } from '../shapes';
  2. import { Point } from '../types';
  3. /**
  4. * 获得图形的x、y、width、height
  5. */
  6. export declare function getShapeSpace(shape: DisplayObject): {
  7. width: number;
  8. height: number;
  9. };
  10. export declare function getLocalBBox(shape: DisplayObject): {
  11. x: number;
  12. y: number;
  13. width: number;
  14. height: number;
  15. left: number;
  16. bottom: number;
  17. top: number;
  18. right: number;
  19. };
  20. export declare function createTempText(group: DisplayObject, attrs: TextStyleProps): Text;
  21. export declare function isHorizontal(p1: Point, p2: Point): boolean;
  22. export declare function isVertical(p1: Point, p2: Point): boolean;