2011-12-21 17 views

答えて

10
ImageView imageView = (ImageView)findViewById(R.id.imageview); 
Drawable drawable = imageView.getDrawable(); 
Rect imageBounds = drawable.getBounds(); 

次に、Matrix.mapRectを使用します。

+1

素晴らしい、ありがとう! – saarraz1

+0

私は助けることができてうれしいよ:) –

+0

それで、私のための完全なコードは でした 'Rect bounds = imageView.getDrawable()。getBounds(); RectF boundsF = new RectF(bounds); imageView.getImageMatrix()。mapRect(boundsF); boundsF.round(bounds); ' ありがとう、それは働いて、私は最終的に移行を修正しました! – charlag

関連する問題