Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在android画布中翻转位图。?
我可以使用动画类翻转视图,但如何翻转画布中的位图。?
通过使用canvas.rotate(x);我可以旋转画布选择的路径,但我的要求是翻转..有人可以帮我吗
canvas.rotate(x)
您可以Matrix为此使用:
Matrix
final Matrix matrix = new Matrix(); matrix.postScale(-1, 1); matrix.postTranslate(positionX, positionY); canvas.drawBitmap(bitmap, matrix, paint);