Load SVG into your MATLAB code

版本 1.1.0 (14.9 KB) 作者: Tommy
This function is not perfect yet, but it is better than any of the existing svg read functions.
1.4K 次下载
更新时间 2019/7/24

查看许可证

The zip contains the following files:.
*loadsvg: main function
*svgc: local function for calculating points on Bézier curves
*svgl: local function to compute a point on a line

This function reads the path data in svg and calculates curves and lines. All lines and cubic Bézier curves are supported, but quadratic and elliptical curves are not yet supported (To be updated). It also does not support circles or rectangles that are not path data.

*A fill cannot be drawn.

How to use
*loadsvg (filename, finish, graph)
*filename: the name of the file you want to load
*finish: The accuracy of curves and lines. This value is between 0 and 1, and the closer to 0, the higher the resolution.
*graph: Takes a value of true or false. If true, draw svg on the graph. If false, just output an array of coordinates.

引用格式

Tommy (2024). Load SVG into your MATLAB code (https://www.mathworks.com/matlabcentral/fileexchange/72225-load-svg-into-your-matlab-code), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2019a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Spreadsheets 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1.0

*Even an svg such as ".123.456" would recognize it as "0.123, 0.456".
*ID is not recognized, but there is no error with id.

1.0.0