Tkinter入门
前页 | Chapter 15. The Canvas Bitmap Item | 后页

# Options

The bitmap item supports the following options, via the `create_bitmap` method, and the `itemconfig` and `itemcget` configuration methods.

Table 15-1. Canvas Bitmap Options

Option | Type | Description
--- | --- | ---
`bitmap` | bitmap | The name of the bitmap.
`anchor` | constant | Specifies which part of the bitmap that should be placed at the given position. Use one of `N`, `NE`, `E`, `SE`, `S`, `SW`, `W`, `NW`, or `CENTER`. Default is `CENTER`.
`foreground` | color | The color to use for the bitmap's foreground pixels (that is, non-zero pixels). If an empty string is given, the foreground pixels are not drawn. Default is "black".
`background` | color | The color to use for the bitmap's background pixels (that is, zero pixels). If an empty string is given, the background pixels are not drawn. Default is empty (transparent).
`tags` | tuple | One or more tags to associate with this item. If only a single tag is to be used, you can use a single string instead of a tuple of strings.

前页 | Home | 后页
Methods | Up | The Canvas Image Item