xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

svg-path-to-polygons & svg-path-parser All In One

svg-path-to-polygons & svg-path-parser All In One

svg-path-to-polygons

https://www.npmjs.com/package/svg-path-to-polygons

https://github.com/Phrogz/svg-path-to-polygons/blob/master/svg-path-to-polygons.js


const { pathDataToPolys } = require('../svg-path-to-polygons.js');

let pathData = 'M5,15 c5.5,0 10-4.5 10,-10 h10';

let points = pathDataToPolys(pathData, {tolerance:1, decimals:1});

console.log(points);

/*
[
  [ [5,15],[7,14.8],[10.6,13.3],[13.3,10.6],[14.8,7],[15,5],[25,5] ]
]
*/

svg-path-parser

https://www.npmjs.com/package/svg-path-parser

https://github.com/hughsk/svg-path-parser#readme

https://www.npmjs.com/package/svg-path-parse

https://github.com/convertSvg/svg-path-parse

https://www.npmjs.com/package/@types/svg-path-parser

svg-pathdata

Parse SVG PathDatas

https://www.npmjs.com/package/svg-pathdata

https://github.com/nfroidure/svg-pathdata#readme

https://svgjs.com/docs/2.7/plugins/svg-path-js/

svg polygon to path

demo

http://phrogz.net/svg/convert_polys_to_paths.svg

https://stackoverflow.com/questions/10717190/convert-svg-polygon-to-path

refs



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2020-01-07 10:15  xgqfrms  阅读(757)  评论(8编辑  收藏  举报