Arc

Arc objects are created using the following functions.  An Arc is drawn inside an invisible rectangle by specifying the top-left corner point (x1, y1), the bottom-right corner point (x2, y2), the start angle, and the end angle in degrees.

Function Description
Arc(x1, y1, x2, y2, startAngle, endAngle) Creates an Arc with top-left corner at x1, y1, bottom-right corner at x2, y2, , startAngle (in degrees), endAngle (in degrees).
Notes: Angle 0 is at the three o’clock position, 90 at twelve o’clock, 180 at nine o’clock, and 270 at six o’clock.  Also, -90 is at six o’clock, -270 at twelve o’clock, and so on.  Drawing always occurs from startAngle to endAngle (if startAngle < endAngle, drawing is counterclockwise; else, it’s clockwise).
Arc(x1, y1, x2, y2, startAngle, endAngle, color, fill, thickness) Same as above, plus color (e.g. Color.BLACK (default), Color.ORANGE or Color(255, 0, 255), using specific RGB values), fill (boolean – default is False), and thickness (default is 1 (pixel)).

Once an Arc has been created, it may be added to a Display.

arc1 = Arc(100, 100, 200, 200, 0, 180)
d.add(arc1)

Finally, you may use the following functions:

Function Description
arc1.encloses(other) Returns True if arc1 encloses other graphics object.
arc1.intersects(other) Returns True if arc1 intersects other graphics object.
arc1.getX() Returns the x coordinate (in pixels).
arc1.getY() Returns the y coordinate (in pixels).
arc1.setX(x) Sets the x coordinate (in pixels).
arc1.setY(y) Sets the y coordinate (in pixels).
arc1.getPosition() Returns the position as an (x, y) tuple.  This is the top-left corner of the box that encloses the arc.
arc1.setPosition(x, y) Sets the position to x, y.  This is the top-left corner of the box that encloses the arc.