Next / Previous / Contents / TCC Help System / NM Tech homepage

6.5. The canvas image object

To display a graphics image on a canvas C, use:

    id = C.create_image ( x, y, option, ... )

This constructor returns the integer ID number of the image object for that canvas.

The image is positioned relative to point (x, y). Options include:

anchorThe default is anchor=CENTER, meaning that the image is centered on the (x, y) position. See Section 4.5, “Anchors” for the possible values of this option. For example, if you specify anchor=S, the image will be positioned so that point (x, y) is located at the center of the bottom (south) edge of the image.
imageThe image to be displayed. See Section 4.9, “Images”, above, for information about how to create images that can be loaded onto canvases.
tagsThe tags to be associated with the object, as a sequence of strings. See Section 6.1.4, “Canvas tags”.