android - Get co-ordinates, height and width of currently visible image in imageview -


i have implemented custom image view allows pinch zooming , panning of image. need store co-ordinates of image , scale can reproduced on other platforms without saving new image

final touchimageview imgview = new touchimageview(this); imgview.setimageresource(r.drawable.an_img); final float [] values = new float[9]; img.matrix.getvalues(values);  float transx = values[matrix.mtrans_x]; float transy = values[matrix.mtrans_y];  log.d("tag", transx + " : " + transy); 

/

rectf rect = new rectf(); img.matrix.maprect(rect); log.e("rect::::: ", rect.height() + " : " + rect.width()); 

enter image description here

co-ordinates within image of view-able section of image (the point in circle on left of drawing)


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -