Android java : Draw polyline on Bitmap [closed]

强颜欢笑 提交于 2021-02-10 14:53:21

问题


I want to draw a polyline on a Bitmap which contains a picture but I don't know if I can draw a polyline on a Bitmap. Any idea ? Thanks for help.


回答1:


You can use following function:

canvas.drawLines(float[] pts, 
            int offset, 
            int count, 
            Paint paint);

OR

canvas.drawPath(Path path, 
                Paint paint);

Check below links for more details: https://developer.android.com/reference/android/graphics/Canvas.html

https://developer.android.com/reference/android/graphics/Canvas.html#drawLines(float[], int, int, android.graphics.Paint)

https://developer.android.com/reference/android/graphics/Canvas.html#drawPath(android.graphics.Path, android.graphics.Paint)



来源:https://stackoverflow.com/questions/43733362/android-java-draw-polyline-on-bitmap

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