Canvas Transformations part 1
Working with Canvas
The Canvas element can be transformed. As an example, a text is written on the canvas at the coordinates (10, 30).
Result:
The translate(x,y) method is used to move the Canvas.
x indicates how far to move the grid horizontally, and y indicates how far to move the grid vertically.
In this example, the canvas is moved 100px to the right, and 150px down.
Result:
Canvas has several methods for drawing paths, boxes, circles, text, and adding images
Comments
Post a Comment