version 1, including all changes.
.
| Rev |
Author |
# |
Line |
| 1 |
perry |
1 |
ppmlabel |
| |
|
2 |
!!!ppmlabel |
| |
|
3 |
NAME |
| |
|
4 |
SYNOPSIS |
| |
|
5 |
DESCRIPTION |
| |
|
6 |
OPTIONS |
| |
|
7 |
BUGS |
| |
|
8 |
SEE ALSO |
| |
|
9 |
AUTHOR |
| |
|
10 |
---- |
| |
|
11 |
!!NAME |
| |
|
12 |
|
| |
|
13 |
|
| |
|
14 |
ppmlabel - add text to a portable pixmap |
| |
|
15 |
!!SYNOPSIS |
| |
|
16 |
|
| |
|
17 |
|
| |
|
18 |
__ppmlabel__ [[__-angle__ ''angle''] [[__-background |
| |
|
19 |
transparent__ | ''colour''] [[__-colour__ |
| |
|
20 |
''colour''] [[__-file__ ''filename''] [[__-size__ |
| |
|
21 |
''textsize''] [[__-text__ '''text string'''] |
| |
|
22 |
[[__-x__ ''column''] [[__-y__ ''row''] ''...'' |
| |
|
23 |
[[''ppmfile''] |
| |
|
24 |
!!DESCRIPTION |
| |
|
25 |
|
| |
|
26 |
|
| |
|
27 |
__ppmlabel__ uses the text drawing facilities of |
| |
|
28 |
__ppmdraw__ to add text to a portable pixmap. The |
| |
|
29 |
location, size, base- line angle, colour of the text and |
| |
|
30 |
background colour (if any) are controlled by command line |
| |
|
31 |
arguments. The text can be specified on the command line or |
| |
|
32 |
read from files. Any number of separate text strings can be |
| |
|
33 |
added by one invocation of __ppmlabel__, limited only by |
| |
|
34 |
the maximum length of the command line. |
| |
|
35 |
|
| |
|
36 |
|
| |
|
37 |
If no ''ppmfile'' is specified, __ppmdraw__ reads its |
| |
|
38 |
input pixmap from standard input. |
| |
|
39 |
!!OPTIONS |
| |
|
40 |
|
| |
|
41 |
|
| |
|
42 |
The arguments on the __ppmlabel__ command line are not |
| |
|
43 |
options in the strict sense; they are commands which control |
| |
|
44 |
the placement and appearance of the text being added to the |
| |
|
45 |
input pixmap. They are executed left to right, and any |
| |
|
46 |
number of arguments may appear. |
| |
|
47 |
|
| |
|
48 |
|
| |
|
49 |
All flags can be abbreviated to their shortest unique pre- |
| |
|
50 |
fix. |
| |
|
51 |
|
| |
|
52 |
|
| |
|
53 |
__-angle__ ''angle'' |
| |
|
54 |
|
| |
|
55 |
|
| |
|
56 |
Sets the angle of the baseline of subsequent text. |
| |
|
57 |
''angle'' is specified as an integral number of degrees, |
| |
|
58 |
measured counterclockwise from the row axis of the |
| |
|
59 |
pixmap. |
| |
|
60 |
|
| |
|
61 |
|
| |
|
62 |
__-background transparent |__ ''colour'' |
| |
|
63 |
|
| |
|
64 |
|
| |
|
65 |
If the argument is __``__transparent__'',__ text is |
| |
|
66 |
drawn over the existing pixels in the pixmap. If a |
| |
|
67 |
''colour'' is given (see the __-colour__ switch be- |
| |
|
68 |
low for information on how to specify colours), rectangles |
| |
|
69 |
enclosing subsequent text are filled with that |
| |
|
70 |
colour. |
| |
|
71 |
|
| |
|
72 |
|
| |
|
73 |
__-colour__ ''colour'' |
| |
|
74 |
|
| |
|
75 |
|
| |
|
76 |
Sets the colour for subsequent text. The ''colour'' can |
| |
|
77 |
be specified in five ways: |
| |
|
78 |
|
| |
|
79 |
|
| |
|
80 |
A name, assuming that a pointer to an X11-style colour names |
| |
|
81 |
file was compiled in. |
| |
|
82 |
|
| |
|
83 |
|
| |
|
84 |
An X11-style hexadecimal specifier: rgb:r/g/b, where r g and |
| |
|
85 |
b are each 1- to 4-digit hexadecimal numbers. |
| |
|
86 |
|
| |
|
87 |
|
| |
|
88 |
An X11-style decimal specifier: rg- bi:r/g/b, where r g and |
| |
|
89 |
b are floating point numbers between 0 and 1. |
| |
|
90 |
|
| |
|
91 |
|
| |
|
92 |
For backwards compatibility, an old-X11-style hexadecimal |
| |
|
93 |
number: #rgb, #rrggbb, #rrrgggbbb, or |
| |
|
94 |
#rrrrggggbbbb. |
| |
|
95 |
|
| |
|
96 |
|
| |
|
97 |
For backwards compatibility, a triplet of numbers separated |
| |
|
98 |
by commas: r,g,b, where r g and b are floating point numbers |
| |
|
99 |
be- tween 0 and 1. (This style was added be- fore MIT came |
| |
|
100 |
up with the similar rgbi style.) |
| |
|
101 |
|
| |
|
102 |
|
| |
|
103 |
__-file__ ''filename'' |
| |
|
104 |
|
| |
|
105 |
|
| |
|
106 |
Reads text from the file ''filename'' and draws it on |
| |
|
107 |
successive lines. |
| |
|
108 |
|
| |
|
109 |
|
| |
|
110 |
__-size__ ''textsize'' |
| |
|
111 |
|
| |
|
112 |
|
| |
|
113 |
Sets the height of the tallest characters above the baseline |
| |
|
114 |
to ''textsize'' pixels. |
| |
|
115 |
|
| |
|
116 |
|
| |
|
117 |
__-text__ '''text string''' |
| |
|
118 |
|
| |
|
119 |
|
| |
|
120 |
Draws the given text string (which must be quot- ed if it |
| |
|
121 |
contains spaces). The location for subsequent text is |
| |
|
122 |
advanced by 1.75 times the current ''textsize'', which |
| |
|
123 |
allows drawing multiple lines of text in a reasonable manner |
| |
|
124 |
without specifying the position of each line. |
| |
|
125 |
|
| |
|
126 |
|
| |
|
127 |
__-x__ ''column'' |
| |
|
128 |
|
| |
|
129 |
|
| |
|
130 |
Sets the column at which subsequent text will be left |
| |
|
131 |
justified. Depending on the shape of the first character, |
| |
|
132 |
the actual text may begin a few pixels to the right of this |
| |
|
133 |
point. |
| |
|
134 |
|
| |
|
135 |
|
| |
|
136 |
__-y__ ''row'' |
| |
|
137 |
|
| |
|
138 |
|
| |
|
139 |
Sets the row which will form the baseline of subsequent |
| |
|
140 |
text. Characters with descenders, such as ``y'', will extend |
| |
|
141 |
below this line. |
| |
|
142 |
!!BUGS |
| |
|
143 |
|
| |
|
144 |
|
| |
|
145 |
Text strings are restricted to 7 bit ASCII. The text font |
| |
|
146 |
used by __ppmdraw__ doesn't include definitions for 8 bit |
| |
|
147 |
ISO 8859/1 characters. |
| |
|
148 |
|
| |
|
149 |
|
| |
|
150 |
When drawing multiple lines of text with a non-transparent |
| |
|
151 |
background, it should probably fill the space between the |
| |
|
152 |
lines with the background colour. This is tricky to get |
| |
|
153 |
right when the text is rotated to a non-orthogonal |
| |
|
154 |
angle. |
| |
|
155 |
!!SEE ALSO |
| |
|
156 |
|
| |
|
157 |
|
| |
|
158 |
ppmmake(1), ppm(5) |
| |
|
159 |
!!AUTHOR |
| |
|
160 |
Copyright (C) 1995 by John Walker |
| |
|
161 |
(kelvin@fourmilab.ch) |
| |
|
162 |
WWW home page: http://www.fourmilab.ch/ |
| |
|
163 |
Permission to use, copy, modify, and distribute this |
| |
|
164 |
soft- ware and its documentation for any purpose and without |
| |
|
165 |
fee is hereby granted, without any conditions or |
| |
|
166 |
restrictions. This software is provided ``as is'' without |
| |
|
167 |
express or im- plied warranty. |
| |
|
168 |
---- |