Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 不旋转位图_Java_Android - Fatal编程技术网

Java 不旋转位图

Java 不旋转位图,java,android,Java,Android,我想以特定角度旋转位图,即angle=meulerZ if (noseBasePos != null) { float width = op.getWidth()/2; float height = op.getHeight()/1.35f; int centrex = (int) (noseBasePos.x - width); int centrey = (int) (noseBasePos.y - height); Matrix mat = new

我想以特定角度旋转位图,即
angle=meulerZ

if (noseBasePos != null) {
    float width = op.getWidth()/2;
    float height = op.getHeight()/1.35f;
    int centrex = (int) (noseBasePos.x - width);
    int centrey = (int) (noseBasePos.y - height);

    Matrix mat = new Matrix();
    mat.setRotate(meulerZ);
    mat.postRotate(meulerZ);
    mat.setTranslate(centrex,centrey);
    op = Bitmap.createBitmap(op, 0,0,op.getWidth(), op.getHeight(), mat, true);
    canvas.drawBitmap(op,mat,null);
}

而且。。。有什么问题?而且。。。问题是什么?角度是90度?实际上我正在尝试开发一个面部过滤应用程序,我正在正确地在面部绘制位图…现在我想以头部倾斜的角度旋转位图。所以角度不是特定的…meuler z是头部倾斜的角度。。。有什么问题?而且。。。问题是什么?角度是90度?