path.d.ts 1.3 KB

1234567891011121314151617181920212223242526272829
  1. /**
  2. * implements morph animation with cubic splitting
  3. * @see http://thednp.github.io/kute.js/svgCubicMorph.html
  4. */
  5. import type { AbsoluteArray } from '@antv/util';
  6. import type { mat4 } from 'gl-matrix';
  7. import type { Circle, Ellipse, Line, Path, PathSegment, Polygon, Polyline, Rect } from '../display-objects';
  8. export declare function getOrCalculatePathTotalLength(path: Path): number;
  9. export declare function hasArcOrBezier(path: AbsoluteArray): boolean;
  10. export declare function extractPolygons(pathArray: AbsoluteArray): {
  11. polygons: [number, number][][];
  12. polylines: [number, number][][];
  13. };
  14. export declare function getPathBBox(segments: any[], lineWidth: number): {
  15. x: number;
  16. y: number;
  17. width: number;
  18. height: number;
  19. };
  20. export declare function path2Segments(path: AbsoluteArray): PathSegment[];
  21. /**
  22. * convert object to path, should account for:
  23. * * transform & origin
  24. * * anchor
  25. * * lineWidth
  26. */
  27. export declare function convertToPath(object: Circle | Ellipse | Rect | Line | Polyline | Polygon | Path, transform?: mat4): string;
  28. export declare function translatePathToString(absolutePath: AbsoluteArray, defX: number, defY: number, startOffsetX?: number, startOffsetY?: number, endOffsetX?: number, endOffsetY?: number): string;
  29. //# sourceMappingURL=path.d.ts.map