Canvas draw line

Is there a way to get a smooth and beautiful line? canvas drawline

Try something like this,

image

It’s much better but not perfect

It depends on the line width , smaller line width -> smoother line