Canvas Transformations part 3
The scale() Method
The scale() method scales the current drawing. It takes two parameters:
- The number of times by which the image should be scaled in the X-direction.
- The number of times by which the image should be scaled in the Y-direction.
This will scale the canvas 1.5 times in the X-direction, and 4 times in Y-direction:
If you scale a drawing, all future drawings will also be scaled.
Comments
Post a Comment