plutosvg
plutosvg copied to clipboard
[Requirement] export parse path function
I am developing the canvas js API based on plutovg and quickjs. Path2D can receive SVG path. So I want this library to implement it. Reference: https://developer.mozilla.org/zh-CN/docs/Web/API/Path2D/Path2D
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var p = new Path2D("M10 10 h 80 v 80 h -80 Z");
ctx.fill(p);
Can we export parse_path function? It could be like the below.
plutovg_path_t *plutosvg_parse_path(const char *path, size_t len)
Thanks, Yu Zhu
I will see what I can do <3