The module provides the following classes of drawable objects:
Point, Line, Circle, Oval,
Rectangle, Polygon, and Text. All objects
are initially created unfilled with a black outline. All graphics
objects support the following generic set of methods:
- Sets the interior of the object to the
- Sets the outline of the object to the given
- Sets the width of the outline of the object to
the desired number of pixels. (Does not work for Point.)
- Draws the object into the given
GraphWin and returns the drawn object.
- Undraws the object from a graphics window. If
the object is not currently drawn, no action is taken.
- Moves the object dx units in the
direction and dy units in the direction. If the object is
currently drawn, the image is adjusted to the new position.
Example: someObject.move(10, 15.5)
- Returns a duplicate of the object. Clones are
always created in an undrawn state. Other than that, they are
identical to the cloned object.
Example: objectCopy = someObject.clone()