How to enlarge with Android Canvas

I have a large vector map that I display in my custom view. I move the map using the canvas.translate () function so I don't have to recalculate all my lines again.

Is there a similar mechanism to achieve the scaling function? I would like to keep my paths with values โ€‹โ€‹and zoom out and in, Or I need to recalculate all the points of my patches from scratch.

Hello

+1


source to share


1 answer


Canvas.scale () will scale the canvas (zoom in / out). Try to scale after you draw your paths. If that doesn't work, you will need to recount the points.



+1


source







All Articles