Displaying Images
The graphics module also provides minimal support for displaying
certain image formats into a GraphWin. Most platforms will support
bitmap, PPM, and GIF images. Display is done with an Image
object. Images support the generic methods move(dx,dy),
draw(graphwin), undraw(), and clone().
Image specific methods are given below.
- Image(centerPoint, image)
- image is either the name of
an image file, or a Pixmap object (see next section).
Constructs an image from contents of the given file or pixmap,
centered at the given center point. Note: if image is a Pixmap,
subsequent changes to the Pixmap will be reflected in the drawn Image.
- getAnchor()
- Returns a clone of the point where the image is
centered.
John Zelle
2005-06-04