function legraPath(context, size = 10, BrickRenderOptions) {
const p = { legra: new Legra(context, size, BrickRenderOptions) };
p.moveTo = (x, y) => {
if (p.x0 === undefined) (p.x0 = x), (p.y0 = y);
p.x = Math.round(x / size);
p.y = Math.round(y / size);
};
p.lineTo = (x, y) => {
p.legra.line(
p.x,
p.y,
(p.x = Math.round(x / size)),
(p.y = Math.round(y / size))
);
};
p.closePath = () => {
p.lineTo(p.x0, p.y0);
delete p.x0;
};
return p;
}