#  Copyright (c) 1996, Expert Interface Technologies
#  See the file "license.terms" for information on usage and redistribution
#  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#  The file man.macros and some of the macros used by this file are
#  copyrighted: (c) 1990 The Regents of the University of California.
#               (c) 1994-1995 Sun Microsystems, Inc.
#  The license terms of the Tcl/Tk distribution are in the file
#  license.tcl.

=head1 NAME

Tk::Pixmap - Create color images from XPM files.

=for category  Tk Image Classes


S<    >I<$widget>-E<gt>B<Pixmap>?(I<name>?,I<options>?)?


XPM is a popular X Window image file format for storing color icons.
The B<Pixmap> image type can be used to create color images using XPM files.

Pixmaps support the following I<options>:

=over 4

=item B<-data> =E<gt> I<string>

Specifies the contents of the source pixmap as a string.  The string
must adhere to the XPM file format (e.g., as generated by the
B<pixmap(1)> program). If both the B<-data> and B<-file>
options are specified, the B<-data> option takes precedence.
Please note that the XPM file parsing code in the xpm library is
somewhat fragile. The first line of the string must be "B</* XPM>
*/" or otherwise a segmatation fault will be caused.

=item B<-file> =E<gt> I<name>

I<name> gives the name of a file whose contents define the source
pixmap.  The file must adhere to the XPM file format (e.g., as
generated by the B<pixmap(1)> program).



When a pixmap image is created, Tk also creates a new object.
This object supports the B<configure> and B<cget> methods
described in L<Tk::options> which can be used to enquire and
modify the options described above.

=head1 SEE ALSO



pixmap, image, tix