Android - Draw Picture over ImageView

人走茶凉 提交于 2020-01-17 05:27:24

问题


I have pretty complex custom ImageView and on the other hand I have Picture object that I want to draw it on the ImageView's canvas? Is this possible? The Picture object is not to be converted in any other type since then it'll lose quality and staff, that's why I go with Picture..

Thanks


回答1:


You have at least 2 options:

1 - Retriev bitmap from ImageView. Create canvas from it:

     Canvas canvas = new Canvas(mImage);

Draw on that canvas.

2 - Put transparent custom View/SurfaceView over ImageView and draw on it.



来源:https://stackoverflow.com/questions/6956774/android-draw-picture-over-imageview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!