Closed ZhUyU1997 closed 1 month ago
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
See https://github.com/sammycage/plutovg/blob/832a378edbeae98cfa984e030a9120ef671bf362/include/plutovg.h#L145
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
Can we export parse_path function? It could be like the below.
Thanks, Yu Zhu