While developing a game that uses the drawing API (Lua) I noticed that diagonal lines have some rendering issues.
For my test case I rendered some 45 degree lines with the following line widths:
0.25, 0.5, 1, 2, 3, 4
All lines with Thickness 0.25
have an overdraw issue (marked green in the images), which might be related to: C API: `drawLine` API can "overdraw" by one pixel
All lines with Thickness 2
and lineCapStyle
set to kLineCapStyleSquare
seem to have a rendering bug (marked red in the images)
Line thickness 2
and 3
render weird line caps when set to kLineCapStyleRound
(marked blue)
Here are the screenshots, line widths top line: 0.25, 0.5, 1
and second line: 2, 3, 4
And here's a PDX to test (Press A to cycle tests):
LineStyle.pdx.zip (3.2 KB)