summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Tk/Pixmap.pod
blob: d0f36b00e65bf7a97051f9951149242514bcbc1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#  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

=head1 SYNOPSIS

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

=head1 DESCRIPTION

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).

=back

=head1 IMAGE METHODS

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

L<Tk::Image|Tk::Image>

=head1 KEYWORDS

pixmap, image, tix

=cut