Why Changing Canvas Size Resets Its Parameters?
When I change the canvas size, I notice the parameter 'mozImageSmoothingEnabled' is being reset. HTML Jav
Solution 1:
Because when you change the canvas width
or height
parameters, every properties of the attached context are reset to their default.
When the canvas element is created, and subsequently whenever the width and height attributes are set (whether to a new value or to the previous value), the bitmap and any associated contexts must be cleared back to their initial state and reinitialized with the newly specified coordinate space dimensions.
Post a Comment for "Why Changing Canvas Size Resets Its Parameters?"