nouns image background
This commit is contained in:
parent
324e057a93
commit
88bb71c73f
|
@ -152,9 +152,8 @@ router.get('/nouns/:word.png', async (req, res) => {
|
|||
const canvas = createCanvas(width, height);
|
||||
const context = canvas.getContext('2d');
|
||||
|
||||
context.fillStyle = '#fff';
|
||||
context.fillRect(0, 0, width, height);
|
||||
context.fillStyle = '#000';
|
||||
const bg = await loadImage('static/bg.png');
|
||||
context.drawImage(bg, 0, 0, width, height);
|
||||
|
||||
context.font = 'bold 64pt Quicksand';
|
||||
context.fillText(base, width / 2 - context.measureText(base).width / 2, 120);
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Reference in New Issue