Draw the custom image over the default
This commit is contained in:
parent
53d030b5cf
commit
dfe72a02d4
1 changed files with 7 additions and 7 deletions
|
@ -296,16 +296,16 @@ class CardCreator {
|
|||
const canvas = createCanvas(canvasSize.width, canvasSize.height);
|
||||
const ctx = canvas.getContext("2d");
|
||||
|
||||
if (customImage != null) {
|
||||
const bg = await loadImage(customImage);
|
||||
|
||||
ctx.drawImage(bg, 0, 0, 890, 722);
|
||||
} else {
|
||||
const portrait = await loadImage(data.Character.Portrait);
|
||||
|
||||
ctx.drawImage(this.bgImage, 0, 0, canvasSize.width, canvasSize.height + 2);
|
||||
|
||||
ctx.drawImage(portrait, 0, 120, 441, 600);
|
||||
|
||||
if (customImage != null) {
|
||||
const bg = await loadImage(customImage);
|
||||
|
||||
ctx.drawImage(bg, 0, 0, canvasSize.width, canvasSize.height);
|
||||
}
|
||||
|
||||
ctx.strokeStyle = white;
|
||||
|
|
Loading…
Reference in a new issue