function drawOval(){
let canvas = document.querySelector('#oval-canvas41');
let context = canvas.getContext('2d');
context.beginPath();
let x = 100;
let y = 100;
let radius = 50;
let startAngle = 0;
let endAngle = 2 * Math.PI;
context.arc(x, y, radius, startAngle, endAngle);
context.stroke();
}
window.addEventListener("load", function(){
drawOval();
});
function drawRect(){
let canvas = document.querySelector('#rect-canvas41');
let context = canvas.getContext('2d');
let x = 50;
let y = 50;
let width = 100;
let height = 50;
context.strokeRect(x, y, width, height);
context.fillStyle = 'rgb(255, 0, 0)';
x = 160;
y = 30;
width = 50;
context.fillRect(x, y, width, height);
}
window.addEventListener('load', function(){
drawRect();
});
function drawText(){
let canvas = document.querySelector('#text-canvas41');
let context = canvas.getContext('2d');
context.font = '24px Impact';
let text = 'Welcome to my blog!';
let x = 30;
let y = 60;
context.strokeText(text, x, y);
x = 60;
y = 100;
context.fillStyle = 'rgb(0, 0, 255)';
context.fillText(text, x, y);
}
window.addEventListener('load', function(){
drawText();
});