Android : canvas.drawBitmap() method not working properly

前端 未结 1 1260
夕颜
夕颜 2021-01-24 23:31

I already post two question related this (plz refer this custom piechart 1 and this custom pie chart 2) but not getting answer ,finally i develop my own but getting stuck at so

相关标签:
1条回答
  • 2021-01-24 23:56

    Thanks to every one. finally i did it using replacing this stuff Rotating Image on A canvas

     matrix.postRotate(_angle1);    
     canvas.drawBitmap(myBitmap1, matrix, null);
    

    with this

    Matrix matrix1 = new Matrix();
    matrix1.setRotate(_angle1, 0, 0);
    canvas.drawBitmap(myBitmap1, matrix1, null);
    

    here ,first you should change the value like this ,

     float myAngle = 0;
     myAngle = ((90 * values.get(i)) / 16);
    
    0 讨论(0)
提交回复
热议问题