Blame


1 058b0118 2005-01-03 devnull .TH TWEAK 1
2 058b0118 2005-01-03 devnull .CT 1 graphics
3 058b0118 2005-01-03 devnull .SH NAME
4 058b0118 2005-01-03 devnull tweak \- edit image files, subfont files, face files, etc.
5 058b0118 2005-01-03 devnull .SH SYNOPSIS
6 058b0118 2005-01-03 devnull .B tweak
7 058b0118 2005-01-03 devnull [
8 058b0118 2005-01-03 devnull .I file ...
9 058b0118 2005-01-03 devnull ]
10 058b0118 2005-01-03 devnull .SH DESCRIPTION
11 058b0118 2005-01-03 devnull .I Tweak
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.
14 058b0118 2005-01-03 devnull .PP
15 058b0118 2005-01-03 devnull .I Tweak
16 058b0118 2005-01-03 devnull reads its argument
17 058b0118 2005-01-03 devnull .I files
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
21 058b0118 2005-01-03 devnull .IR rio
22 058b0118 2005-01-03 devnull window.
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;
29 058b0118 2005-01-03 devnull .BR r ,
30 058b0118 2005-01-03 devnull the rectangle covered by the image;
31 058b0118 2005-01-03 devnull and the name of the
32 058b0118 2005-01-03 devnull .B file
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 d32deab1 2020-08-16 rsc .MR font (7) );
39 058b0118 2005-01-03 devnull and the subfont's
40 058b0118 2005-01-03 devnull .BR n ,
41 058b0118 2005-01-03 devnull .BR height ,
42 058b0118 2005-01-03 devnull and
43 058b0118 2005-01-03 devnull .B ascent
44 058b0118 2005-01-03 devnull as defined in
45 d32deab1 2020-08-16 rsc .MR cachechars (3) .
46 058b0118 2005-01-03 devnull .PP
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
57 058b0118 2005-01-03 devnull .BR x ,
58 058b0118 2005-01-03 devnull .BR top ,
59 058b0118 2005-01-03 devnull .BR bottom ,
60 058b0118 2005-01-03 devnull .BR left ,
61 058b0118 2005-01-03 devnull and
62 058b0118 2005-01-03 devnull .BR width
63 058b0118 2005-01-03 devnull as defined in
64 d32deab1 2020-08-16 rsc .MR cachechars (3) ;
65 058b0118 2005-01-03 devnull and
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.
68 058b0118 2005-01-03 devnull .PP
69 058b0118 2005-01-03 devnull There are two methods to obtain a magnified view of a character from a
70 058b0118 2005-01-03 devnull subfont.
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
73 058b0118 2005-01-03 devnull .B char
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.
79 058b0118 2005-01-03 devnull .PP
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,
87 058b0118 2005-01-03 devnull .I tweak
88 058b0118 2005-01-03 devnull will just magnify the entire file; no sweeping is necessary.)
89 058b0118 2005-01-03 devnull .PP
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.
93 058b0118 2005-01-03 devnull .PP
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:
99 058b0118 2005-01-03 devnull .TP
100 058b0118 2005-01-03 devnull .B mag
101 058b0118 2005-01-03 devnull Default magnification.
102 058b0118 2005-01-03 devnull .TP
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.
107 058b0118 2005-01-03 devnull .TP
108 058b0118 2005-01-03 devnull .B but1
109 058b0118 2005-01-03 devnull .TP
110 058b0118 2005-01-03 devnull .B but2
111 058b0118 2005-01-03 devnull The pixel value written when the corresponding button is pressed over a pixel.
112 058b0118 2005-01-03 devnull .TP
113 058b0118 2005-01-03 devnull .B invert-on-copy
114 058b0118 2005-01-03 devnull Whether the pixel values are inverted when a
115 058b0118 2005-01-03 devnull .B copy
116 058b0118 2005-01-03 devnull operation is performed.
117 058b0118 2005-01-03 devnull .PP
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.
122 058b0118 2005-01-03 devnull .TP
123 058b0118 2005-01-03 devnull .B open
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.
126 058b0118 2005-01-03 devnull .TP
127 058b0118 2005-01-03 devnull .B read
128 058b0118 2005-01-03 devnull Reread a file.
129 058b0118 2005-01-03 devnull .TP
130 058b0118 2005-01-03 devnull .B write
131 058b0118 2005-01-03 devnull Write a file.
132 058b0118 2005-01-03 devnull .TP
133 058b0118 2005-01-03 devnull .B copy
134 058b0118 2005-01-03 devnull Use the copy function, default
135 058b0118 2005-01-03 devnull .BR S ,
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.
142 058b0118 2005-01-03 devnull .TP
143 058b0118 2005-01-03 devnull .B char
144 058b0118 2005-01-03 devnull As described above, open a magnified view of a character image in a subfont.
145 058b0118 2005-01-03 devnull .TP
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.
149 058b0118 2005-01-03 devnull .TP
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.
153 058b0118 2005-01-03 devnull .TP
154 058b0118 2005-01-03 devnull .B exit
155 058b0118 2005-01-03 devnull Quit
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 d32deab1 2020-08-16 rsc .MR cachechars (3) ,
162 d32deab1 2020-08-16 rsc .MR image (7) ,
163 d32deab1 2020-08-16 rsc .MR 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.