dMar dMar - 6 months ago 58
Javascript Question

How to zoom a Canvas drawing

I'm trying to zoom in or out my canvas drawing, but if I only scale the context nothing happens.

Do I need to re-draw it after the scale? Is there any method to scale directly the context without drawing it every time I try to zoom in or out?

PS: I want to zoom in and out with an HTML5

<input type="range">
controlled by a script, and that's already working.


Like Mike said, the best solution is to redraw it. Zooming in with css is a solution, but there's a big loss in quality.