Use Stroke with drawArc?

20 views
Skip to first unread message

Gareth Murfin

unread,
Aug 1, 2016, 5:06:13 AM8/1/16
to CodenameOne Discussions
Is there a way to draw a thicker line when using drawArc? 

Gareth Murfin

unread,
Aug 1, 2016, 11:42:23 AM8/1/16
to CodenameOne Discussions
I realised probably that method was never coded or is gone, ended up using path.arc and drawshape with a stroke, works nice.

GeneralPath pathStatic = new GeneralPath();
pathStatic.arc(xPos, yPos, circleW, circleH , startAngle, angleComplete);
g.drawShape(pathStatic, stroke);         

Shai Almog

unread,
Aug 2, 2016, 12:46:04 AM8/2/16
to CodenameOne Discussions
I would suggest allocating and setting the path lazily and reusing the instance. This will both improve GC support but also allow us to cache hardware buffers matching the shape in native OS shaders.
Reply all
Reply to author
Forward
0 new messages