Answers for "how to add shadow to text in canvas nodejs"

2

how to add shadow to text in canvas nodejs

const { createCanvas } = require('canvas')
const width = 400
const height = 400
const canvas = createCanvas(width, height);

var context = canvas.getContext('2d');
	context.shadowColor = "black";
    context.shadowBlur = 5;
    context.shadowOffsetX = 3;
    context.shadowOffsetY = 3;
    context.font = '20px Arial'
    context.fillStyle = '#fff'
    context.fillText('Awesome! I did it.', width / 2 , 100)
Posted by: Guest on August-26-2020

Code answers related to "how to add shadow to text in canvas nodejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language