Add white background to card drawing for improved visibility
This commit is contained in:
parent
7ae5c8f62a
commit
21005d311c
1 changed files with 4 additions and 0 deletions
|
@ -142,6 +142,10 @@ frameSelect.addEventListener("change", updateFrame);
|
||||||
|
|
||||||
function drawCard() {
|
function drawCard() {
|
||||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
|
// Place a white background
|
||||||
|
ctx.fillStyle = "#FFFFFF"; // white background
|
||||||
|
// make it smaller than the size of the canvas
|
||||||
|
ctx.fillRect(30, 30, canvas.width - 60, canvas.height - 60);
|
||||||
|
|
||||||
// Draw uploaded art as cropped and centered background if present
|
// Draw uploaded art as cropped and centered background if present
|
||||||
if (uploadedImage) {
|
if (uploadedImage) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue