Added .tatoo(), updated jsdoc

main
Killian' Dal-Cin 5 years ago
parent d78cafd91a
commit c4010ff4ce

@ -26,6 +26,10 @@ You can also join me on my <a href="https://discord.gg/qvzwqaM">discord server.<
- You can now configure a currency
- Added .thomas()
## v0.1.11
- Added .tatoo()
- Updated JSDoc
# Download

@ -1,6 +1,6 @@
{
"name": "discord-image-generation",
"version": "0.1.10",
"version": "0.1.11",
"description": "discord-image-generation is a powerfull module that allow you to generate awesome images.",
"main": "src/index.js",
"scripts": {

@ -49,7 +49,7 @@ class DIG {
}
/**
*
* Gay
* @param {image} image
*/
static async gay(image) {
@ -393,7 +393,7 @@ class DIG {
}
/**
*
* Jail
* @param {image} image
*/
static async jail(image) {
@ -408,7 +408,7 @@ class DIG {
}
/**
*
* MMS
* @param {image} image
*/
static async mms(image) {
@ -436,6 +436,21 @@ class DIG {
ctx.drawImage(background, 0, 0, 841, 1058);
return canvas.toBuffer();
}
/**
* Thomas
* @param {image} image
*/
static async tatoo(image) {
if (!image) throw new Error("You must provide an image as a first argument.");
const canvas = Canvas.createCanvas(750, 1089);
const ctx = canvas.getContext("2d");
const avatar = await Canvas.loadImage(image);
const background = await Canvas.loadImage(__dirname +"/assets/tatoo.png");
ctx.drawImage(avatar, 145, 575, 400, 400);
ctx.drawImage(background, 0, 0, 750, 1089);
return canvas.toBuffer();
}
}
module.exports = DIG;

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 KiB

Loading…
Cancel
Save