From 411c0f6cc2cbfabc8d438dd23800645129613cb9 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 28 Apr 2024 15:22:11 -0400 Subject: [PATCH] Fix --- commands/edit-image-text/tweet.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/commands/edit-image-text/tweet.js b/commands/edit-image-text/tweet.js index dd00f934..d1368dff 100644 --- a/commands/edit-image-text/tweet.js +++ b/commands/edit-image-text/tweet.js @@ -124,17 +124,13 @@ module.exports = class TweetCommand extends Command { const labelImg = await loadImage(labelData.body); const labelCanvas = createCanvas(30, 30); const labelCtx = labelCanvas.getContext('2d'); + this.roundedPath(labelCtx, 3, 0, 0, 30, 30); + labelCtx.clip(); + labelCtx.fillStyle = '#303336'; + labelCtx.fillRect(0, 0, 30, 30); this.roundedPath(labelCtx, 3, 5, 5, 20, 20); labelCtx.clip(); labelCtx.drawImage(labelImg, 5, 5, 20, 20); - labelCtx.save(); - labelCtx.beginPath(); - labelCtx.rect(0, 0, 30, 30); - labelCtx.clip(); - labelCtx.strokeStyle = '#303336'; - labelCtx.lineWidth = 5; - labelCtx.stroke(); - labelCtx.restore(); ctx.drawImage(labelCanvas, 80 + nameLen + 3 + 20 + 3, 90, 30, 30); } ctx.font = this.client.fonts.get('ChirpRegular.ttf').toCanvasString(17);