On a Bitmap I can draw a line
and the starting point is oldX,oldY is 242.5 , 389.0
I then zoom only the image no panning
where the oldX ,oldY is still visible but obviously in another location of the screen because it is zoomed in.
Now I start to draw a line over the exact same points as before
newX , newY is 41 , 293.5 the Zoom factor is 2.8225315
The matrix is Matrix{[2.8225315, 0.0, -640.6198][0.0, 2.8225315, -801.00256][0.0, 0.0, 1.0]}
However I can't find a mathematical relationship between oldX and newX, that is the same as oldY and newY
Currently I'm using the event.getX which gives the X position on the screen,
1) Is there anyway to get the X position of the bitmap itself ?
2) Does anyone have an Idea to relate the oldX,oldY with the newX,newY that would apply to all all zoom factors ?
thanks in advance
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment