A bitmap object on a canvas is shown as two colors, the background color (for 0 data values) and the foreground color (for 1 values).
To create a bitmap object on a canvas
, use:
C
id=C.create_bitmap (x,y, *options ... )
which returns the integer ID number of the image object for that canvas.
The
and
x
values are the reference point that specifies where the
bitmap is placed.y
Options include:
anchor | The bitmap is positioned relative to point
(,
).
The default is
anchor=CENTER, meaning that
the bitmap is centered on the
(,
)
position. See Section 4.5, “Anchors” for
the various anchor option
values. For example, if you specify
anchor=NE, the bitmap will
be positioned so that point
(,
)
is located at the northeast (top right) corner of
the bitmap. |
background | The color that
will appear where there are 0 values in the
bitmap. The default is
background="", meaning
transparent. |
bitmap | The bitmap to be displayed; see Section 4.7, “Bitmaps”. |
foreground | The color that
will appear where there are 1 values in the
bitmap. The default is
foreground="black". |
tags | The tags to be associated with the object, as a sequence of strings. |