i would like to ask for some help, i am trying to make a Button using canvas and JavaScript, but i cant get rounded corners... i googled but didnt find anything that could help me out... so im turning myself on you guys
here's what i got now:
Code:
function drawCanvas1() {
var gradientCanvas = document.getElementById('gradientCanvas');
var context = gradientCanvas.getContext('2d');
var myGradient = context.createLinearGradient(0, 60, 0, 0);
myGradient.addColorStop(0, 'blue');
myGradient.addColorStop(1, 'white');
context.fillStyle = myGradient;
context.fillRect(0, 0, 170, 50);
//text drawing..
context.fillStyle = 'white';
context.textBaseline = 'top';
context.font = 'bold 30px sans-serif';
context.fillText('Download', 10, 10);
}






