path.d.ts 1.4 KB

12345678910111213141516171819202122232425262728
  1. export declare const KAPPA = 0.551784;
  2. export declare function sample(elem: SVGPathElement, interval?: number): {
  3. distance: number;
  4. x: number;
  5. y: number;
  6. }[];
  7. export declare function lineToPathData(line: SVGLineElement): string;
  8. export declare function polygonToPathData(polygon: SVGPolygonElement): string | null;
  9. export declare function polylineToPathData(polyline: SVGPolylineElement): string | null;
  10. export declare function getPointsFromSvgElement(elem: SVGPolygonElement | SVGPolylineElement): DOMPoint[];
  11. export declare function circleToPathData(circle: SVGCircleElement): string;
  12. export declare function ellipseToPathData(ellipse: SVGEllipseElement): string;
  13. export declare function rectangleToPathData(rect: SVGRectElement): string;
  14. export declare function rectToPathData(r: {
  15. x: number;
  16. y: number;
  17. width: number;
  18. height: number;
  19. rx?: number;
  20. ry?: number;
  21. 'top-rx'?: number;
  22. 'bottom-rx'?: number;
  23. 'top-ry'?: number;
  24. 'bottom-ry'?: number;
  25. }): string;
  26. export declare function toPath(elem: SVGLineElement | SVGPolygonElement | SVGPolylineElement | SVGEllipseElement | SVGCircleElement | SVGRectElement): SVGPathElement;
  27. export declare function toPathData(elem: SVGLineElement | SVGPolygonElement | SVGPolylineElement | SVGEllipseElement | SVGCircleElement | SVGRectElement): string | null;
  28. export declare function createSlicePathData(innerRadius: number, outerRadius: number, startAngle: number, endAngle: number): string;