The <canvas>
element comes with a rich scripting API that exposes methods and properties allowing us to define and control the shapes that are drawn on the canvas. The API can be broken down into distinct sections depending on what the methods do.
The <canvas>
element itself has a couple of methods that can be called on it, including:
Method |
Usage |
---|---|
Returns an object (a CanvasRenderingContext2D object to be precise) which can then have other methods from the API called on it to manipulate the | |
Returns a data URL representing the image on the |
The <canvas>
element can be thought...