1 |
578 |
markom |
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
<TITLE>pixmap - Create color images from XPM files.</TITLE>
|
5 |
|
|
<Center><H2>pixmap - Create color images from XPM files.</H2></Center><hr>
|
6 |
|
|
|
7 |
|
|
</pre><H3>SYNOPSIS</H3>
|
8 |
|
|
<B>image create pixmap </B></I>?<I>name</I></B>? ?<I>options</I></B>?
|
9 |
|
|
</pre><HR>
|
10 |
|
|
|
11 |
|
|
</pre><H3>DESCRIPTION</H3>
|
12 |
|
|
<P>
|
13 |
|
|
XPM is a popular X Window image file format for storing color icons.
|
14 |
|
|
The <B>pixmap</B></I> image type defined by the <B>Tix(n)</B></I> library can be
|
15 |
|
|
used to create color images using XPM files.
|
16 |
|
|
|
17 |
|
|
</pre><H3>CREATING PIXMAPS</H3>
|
18 |
|
|
<P>
|
19 |
|
|
Like all images, pixmaps are created using the <B>image create</B></I>
|
20 |
|
|
command. Pixmaps support the following <I>options</I></B>:
|
21 |
|
|
<DL>
|
22 |
|
|
<DT> <B>-data <I>string</I></B>
|
23 |
|
|
</I></B>
|
24 |
|
|
<DD> Specifies the contents of the source pixmap as a string. The string
|
25 |
|
|
must adhere to the XPM file format (e.g., as generated by the
|
26 |
|
|
<B>pixmap(1)</B></I> program). If both the <B>-data</B></I> and <B>-file</B></I>
|
27 |
|
|
options are specified, the <B>-data</B></I> option takes precedence.
|
28 |
|
|
Please note that the XPM file parsing code in the xpm library is
|
29 |
|
|
extremely fragile. The first line of the string must be "<B>/* XPM
|
30 |
|
|
*/</B></I>" or otherwise a segmatation fault will be caused.
|
31 |
|
|
</DL>
|
32 |
|
|
<DL>
|
33 |
|
|
<DT> <B>-file <I>name</I></B>
|
34 |
|
|
</I></B>
|
35 |
|
|
<DD> <I>name</I></B> gives the name of a file whose contents define the source
|
36 |
|
|
pixmap. The file must adhere to the XPM file format (e.g., as
|
37 |
|
|
generated by the <B>pixmap(1)</B></I> program).
|
38 |
|
|
</DL>
|
39 |
|
|
</pre><H3>IMAGE COMMAND</H3>
|
40 |
|
|
<P>
|
41 |
|
|
When a pixmap image is created, Tk also creates a new command whose
|
42 |
|
|
name is the same as the image. This command may be used to invoke
|
43 |
|
|
various operations on the image. It has the following general form:
|
44 |
|
|
<pre>
|
45 |
|
|
<I>imageName option </I></B>?<I>arg arg ...</I></B>?
|
46 |
|
|
</pre>
|
47 |
|
|
<I>Option</I></B> and the <I>arg</I></B>s
|
48 |
|
|
determine the exact behavior of the command. The following
|
49 |
|
|
commands are possible for pixmap images:
|
50 |
|
|
<DL>
|
51 |
|
|
<DT> <I>imageName <B>cget</B></I> <I>option</I></B>
|
52 |
|
|
</I></B>
|
53 |
|
|
<DD> Returns the current value of the configuration option given by
|
54 |
|
|
<I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the
|
55 |
|
|
<B>image create pixmap</B></I> command.
|
56 |
|
|
</DL>
|
57 |
|
|
<DL>
|
58 |
|
|
<DT> <I>imageName <B>configure</B></I> ?<I>option</I></B>? ?<I>value option value ...</I></B>?
|
59 |
|
|
</I></B>
|
60 |
|
|
<DD> Query or modify the configuration options for the image. If no
|
61 |
|
|
<I>option</I></B> is specified, returns a list describing all of the
|
62 |
|
|
available options for <I>imageName</I></B> (see <B>Tk_ConfigureInfo</B></I> for
|
63 |
|
|
information on the format of this list). If <I>option</I></B> is specified
|
64 |
|
|
with no <I>value</I></B>, then the command returns a list describing the
|
65 |
|
|
one named option (this list will be identical to the corresponding
|
66 |
|
|
sublist of the value returned if no <I>option</I></B> is specified). If
|
67 |
|
|
one or more <I>option-value</I></B> pairs are specified, then the command
|
68 |
|
|
modifies the given option(s) to have the given value(s); in this case
|
69 |
|
|
the command returns an empty string. <I>Option</I></B> may have any of the
|
70 |
|
|
values accepted by the <B>image create pixmap</B></I> command.
|
71 |
|
|
|
72 |
|
|
</DL>
|
73 |
|
|
</pre><H3>KEYWORDS</H3>
|
74 |
|
|
pixmap(1), image(n), Tix(n)
|
75 |
|
|
<!Serial 851729152>
|
76 |
|
|
<hr><i>Last modified Fri Jan 17 23:02:31 EST 1997 </i> ---
|
77 |
|
|
<i>Serial 853731307</i>
|