Skip to content

Commit f9c645d

Browse files
committed
Finish adding rest of templates overlays
1 parent 8ef8c1d commit f9c645d

2 files changed

Lines changed: 1153 additions & 15 deletions

File tree

frontend/src/components/Canvas.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,17 @@ function Canvas({
12291229
}
12301230
offscreenContext.stroke();
12311231
renderedCount++;
1232+
} else if (obj.type === 'ellipse') {
1233+
offscreenContext.beginPath();
1234+
offscreenContext.ellipse(obj.cx, obj.cy, obj.rx, obj.ry, 0, 0, Math.PI * 2);
1235+
offscreenContext.strokeStyle = obj.stroke || '#333';
1236+
offscreenContext.lineWidth = obj.lineWidth || 2;
1237+
if (obj.fill && obj.fill !== 'transparent') {
1238+
offscreenContext.fillStyle = obj.fill;
1239+
offscreenContext.fill();
1240+
}
1241+
offscreenContext.stroke();
1242+
renderedCount++;
12321243
} else if (obj.type === 'text') {
12331244
offscreenContext.fillStyle = obj.color || '#333';
12341245
offscreenContext.font = `${obj.bold ? 'bold ' : ''}${obj.fontSize || 16}px Arial`;

0 commit comments

Comments
 (0)