Rect rectTemp = mainView.getDrawable().getBounds();
float[] values = new float[9];
matrix.getValues(values);
int leftPosition=(int)values[2];
int rightPosition=(int)(values[2]+rectTemp.width()*values[0]);
int widthValue=panImage.getBoundBox().getWidth();
LogTag.d("z", "Left===>"+leftPosition);
LogTag.d("z", "Right===>"+rightPosition);
LogTag.d("z","width===>"+widthValue);
// mainView.setImageMatrix(matrix);
if(leftPosition>100&&deltaX>0){
PanImageView.this.getParent().requestDisallowInterceptTouchEvent(false);
return false;
}
if(rightPosition<widthValue-100&&deltaX<0){
PanImageView.this.getParent().requestDisallowInterceptTouchEvent(false);
return false;
}
根据Matrix值获取图片位置信息
最新推荐文章于 2024-06-14 18:00:11 发布