home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_d57d399a46bfc679a8bb7df7bb86812b
< prev
next >
Wrap
Text File
|
2000-03-23
|
5KB
|
138 lines
<HTML>
<HEAD>
<TITLE>Tk::Bitmap - Images that display two colors</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Tk::Bitmap - Images that display two colors</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#creating bitmaps">CREATING BITMAPS</A></LI>
<LI><A HREF="#image methods">IMAGE METHODS</A></LI>
<LI><A HREF="#see also">SEE ALSO</A></LI>
<LI><A HREF="#keywords">KEYWORDS</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>Tk::Bitmap - Images that display two colors</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<P> <EM>$image</EM> = <EM>$widget</EM>-><STRONG>Bitmap</STRONG>?(<EM>name</EM>??,<EM>options</EM>?)</P>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>A bitmap is an image whose pixels can display either of two colors
or be transparent.
A bitmap image is defined by four things: a background color,
a foreground color, and two bitmaps, called the <EM>source</EM>
and the <EM>mask</EM>.
Each of the bitmaps specifies 0/1 values for a rectangular
array of pixels, and the two bitmaps must have the same
dimensions.
For pixels where the mask is zero, the image displays nothing,
producing a transparent effect.
For other pixels, the image displays the foreground color if
the source data is one and the background color if the source
data is zero.</P>
<P>
<HR>
<H1><A NAME="creating bitmaps">CREATING BITMAPS</A></H1>
<P>Bitmaps are created using <EM>$widget</EM>-><STRONG>Bitmap</STRONG>.
Bitmaps support the following <EM>options</EM>:</P>
<DL>
<DT><STRONG><A NAME="item_%2Dbackground_%3D%3E_color"><STRONG>-background</STRONG> => <EM>color</EM></A></STRONG><BR>
<DD>
Specifies a background color for the image in any of the standard
ways accepted by Tk. If this option is set to an empty string
then the background pixels will be transparent. This effect
is achieved by using the source bitmap as the mask bitmap, ignoring
any <STRONG>-maskdata</STRONG> or <STRONG>-maskfile</STRONG> options.
<P></P>
<DT><STRONG><A NAME="item_%2Ddata_%3D%3E_string"><STRONG>-data</STRONG> => <EM>string</EM></A></STRONG><BR>
<DD>
Specifies the contents of the source bitmap as a string.
The string must adhere to X11 bitmap format (e.g., as generated
by the <STRONG>bitmap</STRONG> program).
If both the <STRONG>-data</STRONG> and <STRONG>-file</STRONG> options are specified,
the <STRONG>-data</STRONG> option takes precedence.
<P></P>
<DT><STRONG><A NAME="item_%2Dfile_%3D%3E_name"><STRONG>-file</STRONG> => <EM>name</EM></A></STRONG><BR>
<DD>
<EM>name</EM> gives the name of a file whose contents define the
source bitmap.
The file must adhere to X11 bitmap format (e.g., as generated
by the <STRONG>bitmap</STRONG> program).
<P></P>
<DT><STRONG><A NAME="item_%2Dforeground_%3D%3E_color"><STRONG>-foreground</STRONG> => <EM>color</EM></A></STRONG><BR>
<DD>
Specifies a foreground color for the image in any of the standard
ways accepted by Tk.
<P></P>
<DT><STRONG><A NAME="item_%2Dmaskdata_%3D%3E_string"><STRONG>-maskdata</STRONG> => <EM>string</EM></A></STRONG><BR>
<DD>
Specifies the contents of the mask as a string.
The string must adhere to X11 bitmap format (e.g., as generated
by the <STRONG>bitmap</STRONG> program).
If both the <STRONG>-maskdata</STRONG> and <STRONG>-maskfile</STRONG> options are specified,
the <STRONG>-maskdata</STRONG> option takes precedence.
<P></P>
<DT><STRONG><A NAME="item_%2Dmaskfile_%3D%3E_name"><STRONG>-maskfile</STRONG> => <EM>name</EM></A></STRONG><BR>
<DD>
<EM>name</EM> gives the name of a file whose contents define the
mask.
The file must adhere to X11 bitmap format (e.g., as generated
by the <STRONG>bitmap</STRONG> program).
<P></P></DL>
<P>
<HR>
<H1><A NAME="image methods">IMAGE METHODS</A></H1>
<P>When a bitmap image is created, Tk also creates a new object.
This object supports the <STRONG>configure</STRONG> and <STRONG>cget</STRONG> methods
described in <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> which can be used to enquire and
modify the options described above.</P>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P><A HREF="../../../site/lib/Tk/Image.html">Tk::Image</A>
<A HREF="../../../site/lib/Tk/Pixmap.html">Tk::Pixmap</A>
<A HREF="../../../site/lib/Tk/Photo.html">Tk::Photo</A></P>
<P>
<HR>
<H1><A NAME="keywords">KEYWORDS</A></H1>
<P>bitmap, image</P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Tk::Bitmap - Images that display two colors</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>