From 64318301260caf9dc3df84a61111559dce3408d0 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 May 2020 12:08:20 -0400 Subject: [PATCH] Rotation is backwards --- commands/edit-meme/two-buttons.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/edit-meme/two-buttons.js b/commands/edit-meme/two-buttons.js index ee12c3ae..7aba84cb 100644 --- a/commands/edit-meme/two-buttons.js +++ b/commands/edit-meme/two-buttons.js @@ -55,7 +55,7 @@ module.exports = class TwoButtonsCommand extends Command { const canvas = createCanvas(base.width, base.height); const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0); - ctx.rotate(12 * (Math.PI / 180)); + ctx.rotate(-12 * (Math.PI / 180)); ctx.font = '50px Noto'; let fontSize = 50; while (ctx.measureText(first).width > 183) { @@ -72,7 +72,7 @@ module.exports = class TwoButtonsCommand extends Command { } const secondLines = await wrapText(ctx, second, 122); ctx.fillText(secondLines.join('\n'), 355, 79); - ctx.rotate(-12 * (Math.PI / 180)); + ctx.rotate(12 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'two-buttons.png' }] }); } };