04_DrawCurve.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.moveTo(20,20);
mycontext.quadraticCurveTo(20,280,250,200);
mycontext.moveTo(100,100);
mycontext.bezierCurveTo(150,170,200,30,250,100);
mycontext.stroke();
</script>
</body>
</html>
Dosyayı İndir