Last active
September 24, 2016 19:34
-
-
Save mmowbray/6ef1d6be2fe1ecfcff66 to your computer and use it in GitHub Desktop.
Get image u,v from screen touch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//put this just before the 'break;' of switch 'case MotionEventActions.Down:' in MapView | |
float u = (_lastTouchX-_translateX)/(_map.CurrentFloor.Image.IntrinsicWidth*_scaleFactor) + 0.50f; | |
float v = (_lastTouchY-_translateY)/(_map.CurrentFloor.Image.IntrinsicHeight*_scaleFactor) + 0.50f; | |
Log.Wtf("map_press", String.Format("Map Touched: (u,v):({0},{1}", u, v)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for WebView-style Map View: