A full overview of HTML Canvas

A full overview of HTML Canvas

5 years ago
Anonymous $fWzGa1uP8i

https://medium.freecodecamp.org/full-overview-of-the-html-canvas-6354216fba8d

Photo by Armand Khoury on UnsplashOverviewThe HTML canvas element is used to draw “raster” graphics on a web application. The Canvas API provides two drawing contexts: 2D and 3D, and in this guide, we’re going to talk about the 2D one (which I’ll refer it to the Canvas API for simplicity).

Before I get started, I want you to know one very important point. Canvas is a raster graphics API — you manipulate stuff at the pixel level. That means the underlying software does not know the model you are using to display your context — it doesn’t know if you’re drawing a rectangle or a circle.