Putting some indicator around the image in image move/resize/rotate operations

前端 未结 8 1373
终归单人心
终归单人心 2021-01-30 13:54

I would like to Scale, Move, Resize Image. I would like to surround the image with Indicators which guide user what operation these indicators perform i.e. Moving, Rotating, S

8条回答
  •  孤独总比滥情好
    2021-01-30 14:30

    You can use Matrix transaformation to achieve rotating, scaling, and moving....I hope this will help you....

    for rotating

    Matrix matrix = new Matrix();
        matrix.postRotate(90);
    

    for scaling

     matrix.postScale(scaleWidth, scaleHeight);
    

    create new bitmap without changing the original one...like this

    Bitmap bmp2 = Bitmap.createBitmap(bmp1, 0, 0, pow2, pow2, matrix, true);
    

提交回复
热议问题