im = {
const im0 = await FileAttachment("CHSDM-63710F2EF8B52-000001.jpg").image();
const context = DOM.context2d(width, width);
const w2 = width * 1.015;
context.drawImage(
im0,
-width * 0.0055 - (w2 - width) / 2,
-width * 0.005,
w2,
width
);
if (control) {
context.strokeStyle = "red";
for (const r of [0.01, 0.26, 0.41, 0.465]) {
context.beginPath();
context.arc(width / 2, width / 2, width * r, 0, 2 * Math.PI);
context.stroke();
}
}
return Object.assign(context.canvas, {
style: `max-width: ${control ? width : 250}px`
});
}