75 lines
3.7 KiB
HTML
75 lines
3.7 KiB
HTML
<HTML><HEAD><TITLE>Tk Built-In Commands - pixmap manual page</TITLE></HEAD>
|
|
<BR>
|
|
<BODY bgcolor = #ffffa0>
|
|
<H2><IMG ALIGN=BOTTOM SRC="./Img/ManPageYellow.gif"> pixmap</H2>
|
|
<I>Create color images from XPM files.</I><P><IMG ALIGN=TOP SRC="./Img/line-red.gif">
|
|
<H3><A NAME="M2">SYNOPSIS</A></H3>
|
|
(<B>image 'create 'pixmap </B>?<I>name</I>? ?<I>options</I>?)<BR>
|
|
<H3><A NAME="M3">DESCRIPTION</A></H3>
|
|
XPM is a popular X Window image file format for storing color icons.
|
|
The <B>pixmap</B> image type can be used to create color images using
|
|
XPM files.
|
|
|
|
<H3><A NAME="M4">CREATING PIXMAPS</A></H3>
|
|
Like all images, pixmaps are created using the <B><A HREF=../Help/./image.n.html>image create</A></B>
|
|
command. Pixmaps support the following <I>options</I>:
|
|
<P>
|
|
<DL>
|
|
<DT><A NAME="M5"><B>:data </B><I>string</I></A><DD>
|
|
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)</B> program). If both the \fB\:data\fR and \fB\:file\fR
|
|
options are specified, the \fB\:data\fR option takes precedence.
|
|
Please note that the XPM file parsing code in the xpm library is
|
|
extremely fragile. The first line of the string must be "\fB/* XPM
|
|
*/\fR" or otherwise a segmentation fault will be caused.
|
|
<P>
|
|
<DT><A NAME="M6"><B>:file </B><I>name</I></A><DD>
|
|
<I>name</I> 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)</B> program).
|
|
<P>
|
|
</DL>
|
|
<H3><A NAME="M7">IMAGE PROCEDURE</A></H3>
|
|
When a pixmap image is created, Tk also creates a new procedure whose
|
|
name is the same as the image. This procedure may be used to invoke
|
|
various operations on the image. It has the following general form:
|
|
<PRE>(<I>imageName option </I>?<I>arg arg ...</I>?)</PRE>
|
|
<I>Option</I> and the <I>arg</I>s
|
|
determine the exact behavior of the procedure. The following
|
|
commands are possible for pixmap images:
|
|
<P>
|
|
<DL>
|
|
<DT><A NAME="M8">(<I>imageName </I><B>'cget</B> <I>option</I>)</A><DD>
|
|
Returns the current value of the configuration option given by
|
|
<I>option</I>. <I>Option</I> may have any of the values accepted by the
|
|
<B>image create pixmap</B> command.
|
|
<P>
|
|
<DT><A NAME="M9">(<I>imageName </I><B>'configure</B> ?<I>option</I>? ?<I>value option value ...</I>?)</A><DD>
|
|
Query or modify the configuration options for the image. If no
|
|
<I>option</I> is specified, returns a list describing all of the
|
|
available options for <I>imageName</I> (see <B>Tk_ConfigureInfo</B> for
|
|
information on the format of this list). If <I>option</I> is specified
|
|
with no <I>value</I>, then the command returns a list describing the
|
|
one named option (this list will be identical to the corresponding
|
|
sublist of the value returned if no <I>option</I> is specified). If
|
|
one or more <I>option-value</I> pairs are specified, then the command
|
|
modifies the given option(s) to have the given value(s); in this case
|
|
the command returns an empty string. <I>Option</I> may have any of the
|
|
values accepted by the <B>image create pixmap</B> command.
|
|
|
|
<P>
|
|
</DL>
|
|
<H3><A NAME="M10">INITIALIZATION</A></H3>
|
|
Use <B>(require "pixmap")</B> to initialize the pixmap package.
|
|
|
|
<H3><A NAME="M11">CREDITS</A></H3>
|
|
This implementation of the pixmap image format has been stolen in the Tix
|
|
package written by Ioi Kim Lam.
|
|
|
|
<H3><A NAME="M12">SEE ALSO</A></H3>
|
|
<B><A HREF="./bitmap.n.html">bitmap</A></B>, <B>make-image</B>, <B><A HREF="./image.n.html">image</A></B>, <B><A HREF="./jpeg.n.html">jpeg</A></B>, <B><A HREF="./photo.n.html">photo</A></B>
|
|
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif"><P>
|
|
<A HREF=./STk-hlp.html><IMG ALIGN=BOTTOM SRC="./Img/RefBookYellow.gif"> Back to the <B>STk</B> main page</A>
|
|
</BODY></HTML>
|