Search code examples
androidcanvaszoomingandroid-viewpinchzoom

How to zoom lines drawn with Canvas


I'm using an library called ImageTouchView to have pinch zooming feature in my application. But whenever I use Canvas to draw a line on it, the drawn line does not zoom in/out, it just stays with the same size. How am I be able to also zooming the drawn line?


Solution

  • I have solved it. To do it, I had to get the Canvas draw (with all lines I want) and convert it to an bitmap. Then I set this bitmap to the ImageView bitmap. Works like a charm!