draw = function([x0, y0, width, height], ctx, {
stroke,
fill,
lineWidth,
lineJoin,
radius,
}) {
ctx.strokeStyle = stroke ?? 'black';
ctx.fillStyle = fill ?? 'transparent';
ctx.lineWidth = lineWidth ?? 1;
ctx.lineJoin = lineJoin ?? 'miter';
ctx.beginPath();
ctx.roundRect(x0, y0, width, height, radius ?? 0);
ctx.fill();
ctx.stroke();
}