Draw a line with curved edges in Android

Viewed 11229

I am using canvas.drawLine to draw some line in android but the lines are too sharp but i need a curved edges enter image description here

Here the 1 is what i have and 2 is what i want to achieve, means a line with curved edges rather than straight edges

How can I achieve that ??

EDIT 2:

I am trying to use the Canvas object to to draw a line. but the lines have a sharp edge, I need a rounded off edge I am using the Paint object

mPaint = new Paint();
mPaint.setColor(Color.BLACK)

Any help would be appreciated great.

2 Answers

You can use below

pitchPaint.setStrokeCap(Paint.Cap.ROUND)
Related