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

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -