Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / Bitmap.pod
CommitLineData
86530b38
AT
1# Copyright (c) 1994 The Regents of the University of California.
2# Copyright (c) 1994-1996 Sun Microsystems, Inc.
3# See the file "license.terms" for information on usage and redistribution
4# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5#
6#
7
8=head1 NAME
9
10Tk::Bitmap - Images that display two colors
11
12=for category Tk Image Classes
13
14=head1 SYNOPSIS
15
16S< >I<$image> = I<$widget>-E<gt>B<Bitmap>?(I<name>??,I<options>?)
17
18=head1 DESCRIPTION
19
20A bitmap is an image whose pixels can display either of two colors
21or be transparent.
22A bitmap image is defined by four things: a background color,
23a foreground color, and two bitmaps, called the I<source>
24and the I<mask>.
25Each of the bitmaps specifies 0/1 values for a rectangular
26array of pixels, and the two bitmaps must have the same
27dimensions.
28For pixels where the mask is zero, the image displays nothing,
29producing a transparent effect.
30For other pixels, the image displays the foreground color if
31the source data is one and the background color if the source
32data is zero.
33
34=head1 CREATING BITMAPS
35
36Bitmaps are created using I<$widget>-E<gt>B<Bitmap>.
37Bitmaps support the following I<options>:
38
39=over 4
40
41=item B<-background> =E<gt> I<color>
42
43Specifies a background color for the image in any of the standard
44ways accepted by Tk. If this option is set to an empty string
45then the background pixels will be transparent. This effect
46is achieved by using the source bitmap as the mask bitmap, ignoring
47any B<-maskdata> or B<-maskfile> options.
48
49=item B<-data> =E<gt> I<string>
50
51Specifies the contents of the source bitmap as a string.
52The string must adhere to X11 bitmap format (e.g., as generated
53by the B<bitmap> program).
54If both the B<-data> and B<-file> options are specified,
55the B<-data> option takes precedence.
56
57=item B<-file> =E<gt> I<name>
58
59I<name> gives the name of a file whose contents define the
60source bitmap.
61The file must adhere to X11 bitmap format (e.g., as generated
62by the B<bitmap> program).
63
64=item B<-foreground> =E<gt> I<color>
65
66Specifies a foreground color for the image in any of the standard
67ways accepted by Tk.
68
69=item B<-maskdata> =E<gt> I<string>
70
71Specifies the contents of the mask as a string.
72The string must adhere to X11 bitmap format (e.g., as generated
73by the B<bitmap> program).
74If both the B<-maskdata> and B<-maskfile> options are specified,
75the B<-maskdata> option takes precedence.
76
77=item B<-maskfile> =E<gt> I<name>
78
79I<name> gives the name of a file whose contents define the
80mask.
81The file must adhere to X11 bitmap format (e.g., as generated
82by the B<bitmap> program).
83
84=back
85
86=head1 IMAGE METHODS
87
88When a bitmap image is created, Tk also creates a new object.
89This object supports the B<configure> and B<cget> methods
90described in L<Tk::options> which can be used to enquire and
91modify the options described above.
92
93=head1 SEE ALSO
94
95L<Tk::Image|Tk::Image>
96L<Tk::Pixmap|Tk::Pixmap>
97L<Tk::Photo|Tk::Photo>
98
99=head1 KEYWORDS
100
101bitmap, image
102
103=cut