0

旋转图像时,图像下方有空白

如何填充图像?没有空白

如果我使用“scaleType:fitxy”,则无法移动(缩小、放大)

对不起,我的英语不好 ;;

xml: ImageView android:id="@+id/image" android:layout_gravity="fill_vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:adjustViewBounds="true" android:scaleType="matrix"

旋转:

private Bitmap getImageProcess(Bitmap bmp, int nRotate, int viewW, int viewH) {

    Matrix matrix = new Matrix();

    matrix.postRotate(nRotate); 

    Bitmap rotateBitmap = Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(),
            bmp.getHeight(), matrix, true);

      return rotateBitmap;

}
4

1 回答 1

0

If you're trying to fill in a shape then try using a command to fill in the entire shape. If it ends up filling the whole screen, it may be that you've placed the starting point for the filling in the wrong area.

于 2013-06-09T00:37:03.413 回答