Canvas

Canvas Tutorials

Canvas Methods and Properties

HTML canvas scale() Method

HTML canvas scale() Method

 

 

The scale() method is used to scales the current drawing, bigger or smaller.

 

Syntax:-

 

Its syntax is:- context.scale(scalewidth, scaleheight);

 

Further Explanation:-

 

Parameter Description
scalewidth Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, ans so on)
scaleheight Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, ans so on)

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas