Android Question Line caps

francoisg

Active Member
Licensed User
Longtime User
Hi, (sorry if the question have been asked before but I searched and can't find anything!)
how would you go about drawing lines with rounded caps using B4A?

I found the following code (java) online but can't seem to figure out how to do it using b4a ...

privatevoidinitPaint(){
paint=newPaint();
paint.setAntiAlias(true);//enableantialiasing
paint.setColor(Color.WHITE);//setdefaultcolortowhite
paint.setDither(true);//enabledithering
paint.setStyle(Paint.Style.STROKE);//settoSTOKE
paint.setStrokeJoin(Paint.Join.ROUND);//setthejointoroundyouwant
paint.setStrokeCap(Paint.Cap.ROUND);//setthepaintcaptoroundtoo
paint.setPathEffect(newCornerPathEffect(getStrokeWidth()));//setthepatheffectwhentheyjoin.
}

Any help would be greatly appreciated!!!
 
Top