function drawPath(ctx, dpth, sty) {
const cmds = ({M: (c, d)=>c.moveTo(d[0], d[1]),
L: (c, d)=>c.lineTo(d[0], d[1]),
C: (c, d)=>c.bezierCurveTo(d[0], d[1], d[2], d[3], d[4], d[5]),
Z: (c, d)=>c.closePath(), })
const segs = PathData.parse(dpth, {normalize: true});
ctx.save();
ctx.beginPath();
Object.assign(ctx, sty);
for (let i=0; i<segs.length; i++) cmds[segs[i].type](ctx, segs[i].values);
ctx.closePath();
ctx.fill();
ctx.stroke();
ctx.restore();
ctx.restore();
}