Circle

Circle objects are created using the following functions.  Circles are drawn specifying their center point (x, y), and their radius.

Function Description
Circle(x, y, radius) Creates a circle at the given x, y coordinates, and radius.
Circle(x, y, radius, color, fill, thickness) Creates a circle at the given x, y coordinates, radius, 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 a Circle has been created, it may be added to a Display specifying where to place its center point.

Finally, you may use the following functions:

Function Description
circle.getX() Returns the x coordinate (in pixels).
circle.getY() Returns the y coordinate (in pixels).
circle.setX(x) Sets the x coordinate (in pixels).
circle.setY(width) Sets the y coordinate (in pixels).
circle.getPosition() Returns the position as an (x, y) tuple.
circle.setPosition(x, y) Sets the position to x, y.
circle.encloses(other) Returns True if circle encloses other (may be any Widget or Graphics object).
circle.intersects(other) Returns True if circle intersects other (may be any Widget or Graphics object).