From 368335256d619cdd772bf3670ccd046e32a566ac Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 27 May 2020 00:40:46 -0400 Subject: [PATCH] Fix --- commands/edit-image/tweet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/edit-image/tweet.js b/commands/edit-image/tweet.js index 8b229579..a15b746e 100644 --- a/commands/edit-image/tweet.js +++ b/commands/edit-image/tweet.js @@ -64,7 +64,7 @@ module.exports = class TweetCommand extends Command { const avatar = await loadImage(userData.avatar); const base1 = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'tweet', 'bg-1.png')); const base2 = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'tweet', 'bg-2.png')); - const canvas = createCanvas(base1.width + base2.width, base1.height + base2.height); + const canvas = createCanvas(base1.width, base1.height + base2.height); const ctx = canvas.getContext('2d'); ctx.font = '23px Noto'; const lines = await wrapText(ctx, text, 710); @@ -74,9 +74,9 @@ module.exports = class TweetCommand extends Command { const retweets = Math.floor(Math.random() * 999999) + 1; const replies = Math.floor(Math.random() * 999999) + 1; ctx.fillStyle = '#15202b'; - ctx.fillRect(0, base1.height + 1, canvas.width, linesLen); + ctx.fillRect(0, base1.height, canvas.width, linesLen); ctx.drawImage(base1, 0, 0); - const base2StartY = base1.height + linesLen + 1; + const base2StartY = base1.height + linesLen; ctx.drawImage(base2, 0, base2StartY); ctx.textBaseline = 'top'; ctx.font = 'normal bold 18px Noto';