255 lines
5.9 KiB
HTML
255 lines
5.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of ppmlabel</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>ppmlabel</H1>
|
|
Section: User Commands (1)<BR>Updated: 14 June 1995<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="ixAAB"></A>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ppmlabel - add text to a portable pixmap
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
<B>ppmlabel</B>
|
|
|
|
[<B>-angle</B>
|
|
|
|
<I>angle</I>]
|
|
|
|
|
|
[<B>-background</B>
|
|
|
|
<B>transparent</B>
|
|
|
|
|
|
|
<I>colour</I>]
|
|
|
|
[<B>-colour</B>
|
|
|
|
<I>colour</I>]
|
|
|
|
[<B>-file</B>
|
|
|
|
<I>filename</I>]
|
|
|
|
[<B>-size</B>
|
|
|
|
<I>textsize</I>]
|
|
|
|
[<B>-text</B>
|
|
|
|
<I>'text </I>
|
|
|
|
<I>string'</I>]
|
|
|
|
[<B>-x</B>
|
|
|
|
<I>column</I>]
|
|
|
|
[<B>-y</B>
|
|
|
|
<I>row</I>]<I> ... </I>
|
|
|
|
[<I>ppmfile</I>]
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>ppmlabel</B>
|
|
|
|
uses the text drawing facilities of
|
|
<B>ppmdraw</B>
|
|
|
|
to add text to a portable pixmap. The location, size, baseline angle,
|
|
colour of the text and background colour (if any) are controlled by
|
|
command line arguments. The text can be specified on the command line or
|
|
read from files. Any number of separate text strings can be
|
|
added by one invocation of
|
|
<B>ppmlabel</B>,
|
|
|
|
limited only by the maximum length of the command line.
|
|
<P>
|
|
|
|
If no
|
|
<I>ppmfile</I>
|
|
|
|
is specified,
|
|
<B>ppmdraw</B>
|
|
|
|
reads its input pixmap from standard input.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
The arguments on the
|
|
<B>ppmlabel</B>
|
|
|
|
command line are not options in the strict sense; they are
|
|
commands which control the placement and appearance of the
|
|
text being added to the input pixmap. They are executed left to right,
|
|
and any number of arguments may appear.
|
|
<P>
|
|
|
|
All flags can be abbreviated to their shortest unique prefix.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-angle</B><I> angle</I>
|
|
|
|
<DD>
|
|
Sets the angle of the baseline of subsequent text.
|
|
<I>angle</I>
|
|
|
|
is specified as an integral number of degrees, measured
|
|
counterclockwise from the row axis of the pixmap.
|
|
<DT id="2"><B>-background transparent | </B><I>colour</I>
|
|
|
|
<DD>
|
|
If the argument is
|
|
<B>``</B>transparent<B>'',</B>
|
|
|
|
text is drawn over the existing pixels in the pixmap. If a
|
|
<I>colour</I>
|
|
|
|
is given (see the
|
|
<B>-colour</B>
|
|
|
|
switch below for information on how to specify colours),
|
|
rectangles enclosing subsequent text are filled with that colour.
|
|
<DT id="3"><B>-colour</B><I> colour</I>
|
|
|
|
<DD>
|
|
Sets the colour for subsequent text.
|
|
The
|
|
<I>colour</I>
|
|
|
|
can be specified in five ways:
|
|
<DL COMPACT><DT id="4"><DD>
|
|
<DL COMPACT>
|
|
<DT id="5">•<DD>
|
|
A name, assuming
|
|
that a pointer to an X11-style colour names file was compiled in.
|
|
<DT id="6">•<DD>
|
|
An X11-style hexadecimal specifier: rgb:r/g/b, where r g and b are
|
|
each 1- to 4-digit hexadecimal numbers.
|
|
<DT id="7">•<DD>
|
|
An X11-style decimal specifier: rgbi:r/g/b, where r g and b are
|
|
floating point numbers between 0 and 1.
|
|
<DT id="8">•<DD>
|
|
For backwards compatibility, an old-X11-style hexadecimal
|
|
number: #rgb, #rrggbb, #rrrgggbbb, or #rrrrggggbbbb.
|
|
<DT id="9">•<DD>
|
|
For backwards compatibility, a triplet of numbers
|
|
separated by commas: r,g,b, where r g and b are
|
|
floating point numbers between 0 and 1.
|
|
(This style was added before MIT came up with the similar rgbi style.)
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="10"><B>-file</B><I> filename</I>
|
|
|
|
<DD>
|
|
Reads text from the file
|
|
<I>filename</I>
|
|
|
|
and draws it on successive lines.
|
|
<DT id="11"><B>-size</B><I> textsize</I>
|
|
|
|
<DD>
|
|
Sets the height of the tallest characters above the baseline to
|
|
<I>textsize</I>
|
|
|
|
pixels.
|
|
<DT id="12"><B>-text</B><I> 'text string'</I>
|
|
|
|
<DD>
|
|
Draws the given text string (which must be quoted if it contains
|
|
spaces). The location for subsequent text is advanced by
|
|
1.75 times the current
|
|
<I>textsize</I>,
|
|
|
|
which allows drawing multiple lines of text in a reasonable
|
|
manner without specifying the position of each line.
|
|
<DT id="13"><B>-x</B><I> column</I>
|
|
|
|
<DD>
|
|
Sets the column at which subsequent text will be left justified.
|
|
Depending on the shape of the first character, the actual text
|
|
may begin a few pixels to the right of this point.
|
|
<DT id="14"><B>-y</B><I> row</I>
|
|
|
|
<DD>
|
|
Sets the row which will form the baseline of subsequent text.
|
|
Characters with descenders, such as ``y'', will extend below
|
|
this line.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
<P>
|
|
|
|
Text strings are restricted to 7 bit ASCII. The text font used by
|
|
<B>ppmdraw</B>
|
|
|
|
doesn't include definitions for 8 bit ISO 8859/1 characters.
|
|
<P>
|
|
|
|
When drawing multiple lines of text with a non-transparent
|
|
background, it should probably fill the space between the lines
|
|
with the background colour. This is tricky to get right when the
|
|
text is rotated to a non-orthogonal angle.
|
|
<P>
|
|
|
|
The -size, -x, and -y options MUST precede the -text option specifying
|
|
the string they apply to, or they will be silently ignored in favor of
|
|
the defaults.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ppmmake">ppmmake</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+ppm">ppm</A></B>(5)
|
|
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<CENTER>
|
|
Copyright (C) 1995 by John Walker (<A HREF="mailto:kelvin@fourmilab.ch">kelvin@fourmilab.ch</A>)<BR>
|
|
WWW home page: <A HREF="http://www.fourmilab.ch/">http://www.fourmilab.ch/</A><BR>
|
|
</CENTER>
|
|
|
|
<P>
|
|
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
documentation for any purpose and without fee is hereby granted,
|
|
without any conditions or restrictions. This software is provided ``as
|
|
is'' without express or implied warranty.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="17"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="18"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="19"><A HREF="#lbAF">BUGS</A><DD>
|
|
<DT id="20"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="21"><A HREF="#lbAH">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:24 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|