Add a series of points to the
current path on the arc of a circle; you can get elliptical paths by
using scale and rotate before calling fl_arc(). The center of the circle is given by x and y, and r is its radius. fl_arc() takes start and end angles that are measured in degrees counter-clockwise from 3 o'clock. If end is less than start then it draws the arc in a clockwise direction.
This infers that the two calls:
fl_arc(0, 0, radius, 90, 180);
fl_arc(0, 0, radius, 180, 90);
result in the same drawing - the arc selected is from 9 o'clock clockwise to 12 o'clock. And indeed they do.
I coded:
fl_arc(0, 0, radius, 180, 450);
to achieve what I wanted which was to draw an arc clockwise from 12 o'clock to 9 o'clock.
My concern is that this is not properly documented. Should I have drawn two separate arcs from 180 to 360 and 0 to 90?
I also noticed that the code
fl_start_polygon();
fl_vector(0,0);
fl_arc(0,0, radius, 180, 450);
fl_end_polygon();
actually worked to give me the 3/4 of the pie even though it is a concave shape.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.