问题
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