1 058b0118 2005-01-03 devnull .TH TWEAK 1
2 058b0118 2005-01-03 devnull .CT 1 graphics
4 058b0118 2005-01-03 devnull tweak \- edit image files, subfont files, face files, etc.
5 058b0118 2005-01-03 devnull .SH SYNOPSIS
8 058b0118 2005-01-03 devnull .I file ...
10 058b0118 2005-01-03 devnull .SH DESCRIPTION
12 058b0118 2005-01-03 devnull edits existing files holding various forms of images.
13 058b0118 2005-01-03 devnull To create original images, start from an existing image, subfont, etc.
16 058b0118 2005-01-03 devnull reads its argument
18 058b0118 2005-01-03 devnull and displays the resulting images in a vertical column.
19 058b0118 2005-01-03 devnull If the image is too wide to fit across the display, it
20 058b0118 2005-01-03 devnull is folded much like a long line of text in an
23 058b0118 2005-01-03 devnull Under each image is displayed one or two lines of text
24 058b0118 2005-01-03 devnull presenting its parameters.
25 058b0118 2005-01-03 devnull The first line shows the image's
26 058b0118 2005-01-03 devnull .BR depth ,
27 058b0118 2005-01-03 devnull the number
28 058b0118 2005-01-03 devnull of bits per pixel;
30 058b0118 2005-01-03 devnull the rectangle covered by the image;
31 058b0118 2005-01-03 devnull and the name of the
33 058b0118 2005-01-03 devnull from which it was read.
34 058b0118 2005-01-03 devnull If the file is a subfont, a second line presents a hexadecimal 16-bit
35 058b0118 2005-01-03 devnull .B offset
36 058b0118 2005-01-03 devnull to be applied to character values from the subfont
37 058b0118 2005-01-03 devnull (typically as stored in a font file; see
38 058b0118 2005-01-03 devnull .IR font (7));
39 058b0118 2005-01-03 devnull and the subfont's
41 058b0118 2005-01-03 devnull .BR height ,
43 058b0118 2005-01-03 devnull .B ascent
44 058b0118 2005-01-03 devnull as defined in
45 058b0118 2005-01-03 devnull .IR cachechars (3).
47 058b0118 2005-01-03 devnull By means described below, magnified views of portions of the images
48 058b0118 2005-01-03 devnull may be displayed.
49 058b0118 2005-01-03 devnull The text associated with such a view includes
50 058b0118 2005-01-03 devnull .BR mag ,
51 058b0118 2005-01-03 devnull the magnification.
52 058b0118 2005-01-03 devnull If the view is of a single character from a subfont, the second
53 058b0118 2005-01-03 devnull line of text shows the character's value (including the subfont's offset)
54 058b0118 2005-01-03 devnull in hexadecimal and as a character in
55 058b0118 2005-01-03 devnull .I tweak's
56 058b0118 2005-01-03 devnull default font; the character's
58 058b0118 2005-01-03 devnull .BR top ,
59 058b0118 2005-01-03 devnull .BR bottom ,
60 058b0118 2005-01-03 devnull .BR left ,
62 058b0118 2005-01-03 devnull .BR width
63 058b0118 2005-01-03 devnull as defined in
64 058b0118 2005-01-03 devnull .IR cachechars (3);
66 058b0118 2005-01-03 devnull .BR iwidth ,
67 058b0118 2005-01-03 devnull the physical width of the image in the subfont's image.
69 058b0118 2005-01-03 devnull There are two methods to obtain a magnified view of a character from a
71 058b0118 2005-01-03 devnull The first is to click mouse button 1 over the image of the character in
72 058b0118 2005-01-03 devnull the subfont. The second is to select the
74 058b0118 2005-01-03 devnull entry on the button 3 menu,
75 058b0118 2005-01-03 devnull point the resulting gunsight cursor at the desired subfont and click button 3,
76 058b0118 2005-01-03 devnull and then type at the text prompt at the bottom of the screen the
77 058b0118 2005-01-03 devnull character value, either as a multi-digit hexadecimal number or as a single
78 058b0118 2005-01-03 devnull rune representing the character.
80 058b0118 2005-01-03 devnull To magnify a portion of other types of image files,
81 058b0118 2005-01-03 devnull click button 1 over the unmagnified file.
82 058b0118 2005-01-03 devnull The cursor will switch to a cross.
83 058b0118 2005-01-03 devnull Still with button 1, sweep a rectangle, as in
84 058b0118 2005-01-03 devnull .BR rio ,
85 058b0118 2005-01-03 devnull that encloses the portion of the image to be magnified.
86 058b0118 2005-01-03 devnull (If the file is 16×16 or smaller,
88 058b0118 2005-01-03 devnull will just magnify the entire file; no sweeping is necessary.)
90 058b0118 2005-01-03 devnull Pressing buttons 1 and 2 within magnified images changes pixel values.
91 058b0118 2005-01-03 devnull By default, button 1 sets the pixel to all zeros and button 2 sets the pixel
92 058b0118 2005-01-03 devnull to all ones.
94 058b0118 2005-01-03 devnull Across the top of the screen is a textual display of global parameters.
95 058b0118 2005-01-03 devnull These values, as well as many of the textual values associated with
96 058b0118 2005-01-03 devnull the images, may be edited by clicking button 1 on the displayed
97 058b0118 2005-01-03 devnull value and typing a new value.
98 058b0118 2005-01-03 devnull The values along the top of the screen are:
101 058b0118 2005-01-03 devnull Default magnification.
103 058b0118 2005-01-03 devnull .B val(hex)
104 058b0118 2005-01-03 devnull The value used to modify pixels within magnified images.
105 058b0118 2005-01-03 devnull The value must be in hexadecimal, optionally preceded by a
106 058b0118 2005-01-03 devnull tilde for bitwise negation.
111 058b0118 2005-01-03 devnull The pixel value written when the corresponding button is pressed over a pixel.
113 058b0118 2005-01-03 devnull .B invert-on-copy
114 058b0118 2005-01-03 devnull Whether the pixel values are inverted when a
116 058b0118 2005-01-03 devnull operation is performed.
118 058b0118 2005-01-03 devnull Under button 3 is a menu holding a variety of functions.
119 058b0118 2005-01-03 devnull Many of these functions prompt for the image upon which to act
120 058b0118 2005-01-03 devnull by switching to a gunsight cursor; click button 3 over the
121 058b0118 2005-01-03 devnull selection, or click a different button to cancel the action.
124 058b0118 2005-01-03 devnull Read and display a file. The name of the file is typed to the prompt
125 058b0118 2005-01-03 devnull on the bottom line.
128 058b0118 2005-01-03 devnull Reread a file.
130 058b0118 2005-01-03 devnull .B write
131 058b0118 2005-01-03 devnull Write a file.
134 058b0118 2005-01-03 devnull Use the copy function, default
136 058b0118 2005-01-03 devnull to transfer a rectangle of pixels from one image to another.
137 058b0118 2005-01-03 devnull The program prompts with a cross cursor; sweep out a rectangle in
138 058b0118 2005-01-03 devnull one image or just click button 3 to select the whole image.
139 058b0118 2005-01-03 devnull The program will leave that rectangle in place and
140 058b0118 2005-01-03 devnull attach another one to the cursor. Move that rectangle to the desired
141 058b0118 2005-01-03 devnull place in any image and click button 3, or another button to cancel the action.
144 058b0118 2005-01-03 devnull As described above, open a magnified view of a character image in a subfont.
146 058b0118 2005-01-03 devnull .B pixels
147 058b0118 2005-01-03 devnull Report the coordinate and value of individual pixels indicated by pressing button 3.
148 058b0118 2005-01-03 devnull This is a mode of operation canceled by pressing button 1 or 2.
150 058b0118 2005-01-03 devnull .B close
151 058b0118 2005-01-03 devnull Close the specified image.
152 058b0118 2005-01-03 devnull If the image is the unmagnified file, also close any magnified views of that file.
156 058b0118 2005-01-03 devnull .IR tweak .
157 058b0118 2005-01-03 devnull The program will complain once about modified but unwritten files.
158 058b0118 2005-01-03 devnull .SH SOURCE
159 c3674de4 2005-01-11 devnull .B \*9/src/cmd/draw/tweak.c
160 058b0118 2005-01-03 devnull .SH "SEE ALSO"
161 058b0118 2005-01-03 devnull .IR cachechars (3),
162 058b0118 2005-01-03 devnull .IR image (7),
163 058b0118 2005-01-03 devnull .IR font (7)
164 058b0118 2005-01-03 devnull .SH BUGS
165 058b0118 2005-01-03 devnull For a program written to adjust width tables in fonts,
166 058b0118 2005-01-03 devnull .I tweak
167 058b0118 2005-01-03 devnull has been pushed unreasonably far.