VOOZH about

URL: https://www.geeksforgeeks.org/html/html-canvas-beginpath-method/

⇱ HTML canvas beginPath() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML canvas beginPath() Method

Last Updated : 9 Jun, 2023
The canvas beginPath() method is used to start a path or reset the current path. The moveTo(), lineTo(), quadricCurveTo(), bezierCurveTo(), arcTo(), and arc() methods are used to create paths. Also, the stroke() method is used to draw the path on the canvas. Syntax:
context.beginPath();
Example 1: Output: 👁 Image
Example 2: 👁 Image
Supported Browsers: The browsers supported by HTML canvas beginPath() method are listed below:
  • Google Chrome
  • Internet Explorer 9.0
  • Firefox
  • Safari
  • Opera
Comment
Article Tags: