0

我们可以围绕中心旋转位图图像吗?我正在使用代码,但它会自行旋转

public Bitmap rotateCar(Bitmap carImage,float degrees)
{
    Matrix matrix = new Matrix();
    matrix.postRotate(degrees);

    Bitmap rotatedCarImage=Bitmap.createBitmap(carImage,0,0, carImage.getWidth(), carImage.getHeight(),matrix, true);
     return rotatedCarImage;
}//end of rotate car
4

0 回答 0