kLineCapStyleRound circle drawing looks off on lines with an even thickness


I noticed that line drawing in my game looked odd. There would be this sharp edge sticking out of some lines, causing it to not look nice and smooth.

Here's some lines that have the sharp edge:

After bringing this up on the Discord, lichen5666 helped figure out that this might be due to the line cap style.

This weird sharp edge issue went away when the lines were drawn with kLineCapStyleButt:

Then crwi_uk brought up a good point:

After switching the line thickness of one line from 10px to 9px, this seemed to fix the issue!

Before and after pictures (10px / 9px):

Reproduction of this seems to be as simple as drawing a line with kLineCapStyleRound, and at an even numbered line width.

Thankfully, the workarounds for this are very easy, and they barely affect the look of the line.
Crwi_uk and I think that adding a note in the docs on how to avoid this problem could be really helpful.