ArcCircle

ArcCircle objects are created using the following functions.  An ArcCircle is drawn specifying its center point, radius, start angle, and end angle in degrees.

FunctionDescription
ArcCircle(x, y, radius, startAngle, endAngle)Creates an ArcCircle with center at x, y, radius, startAngle (in degrees), endAngle (in degrees).  Angles are interpreted such that 0 degrees is at the three o’clock position. A positive value indicates a counter-clockwise rotation – while a negative value indicates a clockwise rotation. The constants HALF_PI, PI, and TWO_PI can be used in place of degrees.
ArcCircle(x, y, radius, startAngle, endAngle, style)Same as above, plus style. Style options are OPEN (a semi-circle – which is the default), CHORD (a closed semi-circle), and PIE (a closed pie segment).
ArcCircle(x, y, radius, startAngle, endAngle, style, 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.

arc = ArcCircle(100, 100, 20, 0, 180)
d.add(arc)

Finally, you may use the following functions:

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