1Bitmap(3)             User Contributed Perl Documentation            Bitmap(3)
2
3
4

NAME

6       Tk::Bitmap - Images that display two colors
7

SYNOPSIS

9        $image = $widget->Bitmap?(name??,options?)
10

DESCRIPTION

12       A bitmap is an image whose pixels can display either of two colors or
13       be transparent.  A bitmap image is defined by four things:  a back‐
14       ground color, a foreground color, and two bitmaps, called the source
15       and the mask.  Each of the bitmaps specifies 0/1 values for a rectangu‐
16       lar array of pixels, and the two bitmaps must have the same dimensions.
17       For pixels where the mask is zero, the image displays nothing, produc‐
18       ing a transparent effect.  For other pixels, the image displays the
19       foreground color if the source data is one and the background color if
20       the source data is zero.
21

CREATING BITMAPS

23       Bitmaps are created using $widget->Bitmap.  Bitmaps support the follow‐
24       ing options:
25
26       -background => color
27           Specifies a background color for the image in any of the standard
28           ways accepted by Tk.  If this option is set to an empty string then
29           the background pixels will be transparent.  This effect is achieved
30           by using the source bitmap as the mask bitmap, ignoring any -mask‐
31           data or -maskfile options.
32
33       -data => string
34           Specifies the contents of the source bitmap as a string.  The
35           string must adhere to X11 bitmap format (e.g., as generated by the
36           bitmap program).  If both the -data and -file options are speci‐
37           fied, the -data option takes precedence.
38
39       -file => name
40           name gives the name of a file whose contents define the source bit‐
41           map.  The file must adhere to X11 bitmap format (e.g., as generated
42           by the bitmap program).
43
44       -foreground => color
45           Specifies a foreground color for the image in any of the standard
46           ways accepted by Tk.
47
48       -maskdata => string
49           Specifies the contents of the mask as a string.  The string must
50           adhere to X11 bitmap format (e.g., as generated by the bitmap pro‐
51           gram).  If both the -maskdata and -maskfile options are specified,
52           the -maskdata option takes precedence.
53
54       -maskfile => name
55           name gives the name of a file whose contents define the mask.  The
56           file must adhere to X11 bitmap format (e.g., as generated by the
57           bitmap program).
58

IMAGE METHODS

60       When a bitmap image is created, Tk also creates a new object.  This
61       object supports the configure and cget methods described in Tk::options
62       which can be used to enquire and modify the options described above.
63

SEE ALSO

65       Tk::Image Tk::Pixmap Tk::Photo
66

KEYWORDS

68       bitmap, image
69
70
71
72perl v5.8.8                       2008-02-05                         Bitmap(3)
Impressum