Last active
December 23, 2015 12:58
-
-
Save vishnukvmd/6638526 to your computer and use it in GitHub Desktop.
This file contains 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
public float[] transformCoordinates(float x, float y) { | |
float [] coordinates = new float [] {x, y}; | |
Matrix matrix = new Matrix(); | |
this.getImageMatrix().invert(matrix); // Inside a class that extends ImageView. Hence this->ImageView | |
matrix.postTranslate(this.getScrollX(), this.getScrollY()); | |
matrix.mapPoints(coordinates); | |
return coordinates; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment