Skip to content

Tag: html5-canvas

Canvas API implementation

I recently started to learn a bit about how javascript work under the hood, and came to know that (in the context of chrome) v8 engine and web APIs are different. Here’s some questions I have regarding the canvas API specifically: Why do we need to use getImageData() every time we want to access the pix…

Drawing A Rotated Path2D Object on canvas

I have a canvas where i want to draw a rotated svg. In order to achieve this, i created a Path2D object and used the context.fill() option to draw the svg. Moreover, I used context.translate(x , y) inorder to position the svg. Now, the issue i how to rotate this? I found some solutions where it stated that fi…