mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Make square avatars rounded
This commit is contained in:
@@ -197,6 +197,9 @@ module.exports = class TweetCommand extends Command {
|
||||
ctx.arc(17 + 26, 84 + 26, 26, 0, Math.PI * 2);
|
||||
ctx.closePath();
|
||||
ctx.clip();
|
||||
} else {
|
||||
this.roundedPath(ctx, 10, 17, 84, 52, 52);
|
||||
ctx.clip();
|
||||
}
|
||||
ctx.drawImage(avatar, 17, 84, 52, 52);
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'tweet.png' }] });
|
||||
|
||||
Reference in New Issue
Block a user