@antv/x6
Version:
JavaScript diagramming library that uses SVG and HTML for rendering
25 lines (24 loc) • 1.39 kB
TypeScript
export declare const KAPPA = 0.551784;
export declare function sample(elem: SVGPathElement, interval?: number): any[];
export declare function lineToPathData(line: SVGLineElement): string;
export declare function polygonToPathData(polygon: SVGPolygonElement): string;
export declare function polylineToPathData(polyline: SVGPolylineElement): string;
export declare function getPointsFromSvgElement(elem: SVGPolygonElement | SVGPolylineElement): any[];
export declare function circleToPathData(circle: SVGCircleElement): string;
export declare function ellipseToPathData(ellipse: SVGEllipseElement): string;
export declare function rectangleToPathData(rect: SVGRectElement): any;
export declare function rectToPathData(r: {
x: number;
y: number;
width: number;
height: number;
rx?: number;
ry?: number;
'top-rx'?: number;
'bottom-rx'?: number;
'top-ry'?: number;
'bottom-ry'?: number;
}): any;
export declare function toPath(elem: SVGLineElement | SVGPolygonElement | SVGPolylineElement | SVGEllipseElement | SVGCircleElement | SVGRectElement): SVGPathElement;
export declare function toPathData(elem: SVGLineElement | SVGPolygonElement | SVGPolylineElement | SVGEllipseElement | SVGCircleElement | SVGRectElement): any;
export declare function createSlicePathData(innerRadius: number, outerRadius: number, startAngle: number, endAngle: number): string;