Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

Getting correct coordinates after pinch zoom (drawing line) Android Canvas

$
0
0

I am trying to draw the line following by the users finger(touch). It is quite easy task to implement if there is no scaling.   
Drawing without scaling works perfectly here is an screenshot     
 
SMciL.png
 
Works well. As you can see.    
 
But if I scale an canvas it begins to draw points with some margin/measurement error/tolerance. It seems that I have not taken some value in advance while calculating scaled touch points, I have tried a lot of different formulas, but nothing helped.    
 
Here is the result of …


Viewing all articles
Browse latest Browse all 16874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>