ScreenPainter.drawArc

Draws an arc inside the bounding box given by upperLeft, width, and height, from the angle (start / 64) degrees for (length / 64) degrees of rotation.

More...
struct ScreenPainter
void
drawArc

Detailed Description

If length is positive, it travels counter-clockwise from start. If negative, it goes clockwise. start == 0 at the three o'clock position of the bounding box - the center of the line at the right-hand side of the screen.

The arc is outlined with the current pen and filled with the current fill. On Windows, the line segments back to the middle are also drawn unless you have a full length ellipse.

Bugs

They still don't exactly match in outlining the arc with straight lines (Windows does, Linux doesn't for now).

The arc outline on Linux sometimes goes over the target.

The fill on Windows sometimes stops short.

Meta

History

This function was broken af, totally inconsistent on platforms until September 24, 2021.

The interpretation of the final argument was incorrectly documented and implemented until August 2, 2024.