Android, help rotating image on touch

后端 未结 3 1237
情书的邮戳
情书的邮戳 2021-01-31 23:43

I am trying to rotate one of the transparent PNGs on this image. The number part is what I want to rotate. I am able to do this, but it is not what I am trying to achieve

3条回答
  •  时光取名叫无心
    2021-02-01 00:26

    By accepting @Dipak Keshariya's answer i am putting way to to get the angle rotation which can help you identify selected part of wheel.

    private float copy[] = new float[9];
        matrix.getValues(copy);
    float wheelAngle = Math.round(Math.atan2(copy[Matrix.MSKEW_X],
                    copy[Matrix.MSCALE_X]) * (180 / Math.PI));
    

提交回复
热议问题