Create an arc between two tangents on the canvas:
JavaScript:
![]()
Internet Explorer 9, Firefox, Chrome, and Safari support the arcTo() method.
Note: Opera does not support the arcTo() method.
Note: Internet Explorer 8 and earlier do not support the <canvas> element.
The arcTo() method creates an arc/curve between two tangents on the canvas.
Tip: Use the stroke() method to actually draw the arc on the canvas.
| JavaScript syntax: | context.arcTo(x1,y1,x2,y2,r); |
|---|
| Parameter | Description | Play it |
|---|---|---|
| x1 | The x-coordinate of the beginning of the arc | Play it » |
| y1 | The y-coordinate of the beginning of the arc | Play it » |
| x2 | The x-coordinate of the end of the arc | Play it » |
| y2 | The y-coordinate of the end of the arc | Play it » |
| r | The radius of the arc | Play it » |
HTML Canvas Reference
Your message has been sent to W3Schools.