Prev Demo
Y-Coordinate
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Y-Coordinate</title> </head> <body> <h2 style="color:green">Y-coordinate moves the arc from top to bottom in the canvas </h2> <canvas id="myCanvas" width="400" height="250" style="border:5px solid red;"> </canvas> <script> var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); context.beginPath(); context.arc(100, 95, 50, 0 * Math.PI, 1.5 * Math.PI); context.stroke(); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output