Point

Point objects are created using the following functions.  Points are drawn specifying their center point (x, y).

Function Description
Point(x, y) Creates a new Point at the given x, y coordinates.
Point(x, y, color) Creates a new Point at the given x, y  coordinates, and color (e.g. Color.BLACK (default), Color.ORANGE or Color(255, 0, 255), using specific RGB values).

Once a Point 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
point1.getX() Returns the x coordinate (in pixels).
point1.getY() Returns the y coordinate (in pixels).
point1.setX(x) Sets the x coordinate (in pixels).
point1.setY(width) Sets the y coordinate (in pixels).
point1.getPosition() Returns the position as an (x, y) tuple.
point1.setPosition(x, y) Sets the position to x, y.
point1.encloses(other) Returns True if point1 encloses other (may be any Widget or Graphics object). Of course, a point may possibly only enclose another point.
point1.intersects(other) Returns True if point1 intersects other (may be any Widget or Graphics object).