Commit 24146cc9 authored by nishanth's avatar nishanth

nishanth

parent 60d25917
Pipeline #12008 passed with stage
in 14 seconds
<!DOCTYPE html>
<html>
<head>
<title>HTML5 canvas shapes</title>
<canvas id="myCanvas" width="350" height="350">
</canvas>
<script>
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'blue';
ctx.fillRect(10, 10, 60, 60);
ctx.fillRect(100, 10, 90, 60);
ctx.beginPath();
ctx.arc(250, 40, 32, 0, 2*Math.PI);
ctx.fill();
ctx.beginPath();
ctx.moveTo(10, 160);
ctx.lineTo(90, 160);
ctx.lineTo(50, 110);
ctx.closePath();
ctx.fill();
ctx.save();
ctx.scale(2, 1);
ctx.beginPath();
ctx.arc(72, 130, 25, 0, 2*Math.PI);
ctx.fill();
ctx.restore();
ctx.beginPath();
ctx.arc(250, 120, 40, 0, Math.PI);
ctx.fill();
</script>
<canvas id="myCanvas1" width="350" height="350">
</canvas>
<script>
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;">
</canvas>
</head>
<body>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment