04_DrawArcEllipse.html
Dosyayı İndir
<!DOCTYPE html>
<html>
<body>
<canvas id="mycanvas" width="300" height="240" style="border: 1px solid blue">
</canvas>
<script>
var mycanvas = document.getElementById('mycanvas');
var mycontext=mycanvas.getContext("2d");
mycontext.beginPath();
mycontext.lineWidth = 5;
mycontext.strokeStyle = "#FF0000";
mycontext.fillStyle = "#00FFFF";
mycontext.ellipse(200,50,30,50,45,0,2*Math.PI);
mycontext.fill();
mycontext.moveTo(80,100);
mycontext.arc(50,100,30,0,2*Math.PI);
mycontext.moveTo(180,150);
mycontext.arc(150,150,30,0,3*Math.PI/2);
mycontext.stroke();
</script>
</body>
</html>
Dosyayı İndir