aboutsummaryrefslogtreecommitdiff
path: root/man/man1/tweak.html
blob: 9d63dcd450f70dcee6014d0f641664074e4a9733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<head>
<title>tweak(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>TWEAK(1)</b><td align=right><b>TWEAK(1)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    tweak &ndash; edit image files, subfont files, face files, etc.<br>
    
</table>
<p><font size=+1><b>SYNOPSIS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>tweak</font></tt> [ <i>file ...</i> ]<br>
    
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>Tweak</i> edits existing files holding various forms of images. To
    create original images, start from an existing image, subfont,
    etc. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>Tweak</i> reads its argument <i>files</i> and displays the resulting images
    in a vertical column. If the image is too wide to fit across the
    display, it is folded much like a long line of text in an <i>rio</i>
    window. Under each image is displayed one or two lines of text
    presenting its parameters. The first line shows the image&#8217;s <tt><font size=+1>depth</font></tt>,
    the number of bits per pixel; <tt><font size=+1>r</font></tt>, the rectangle covered by the
    image; and the name of the <tt><font size=+1>file</font></tt> from which it was read. If the
    file is a subfont, a second line presents a hexadecimal 16-bit
    <tt><font size=+1>offset</font></tt> to be applied to character values from the subfont (typically
    as stored in a font file; see <a href="../man7/font.html"><i>font</i>(7)</a>); and the subfont&#8217;s <tt><font size=+1>n</font></tt>,
    <tt><font size=+1>height</font></tt>, and <tt><font size=+1>ascent</font></tt> as defined in <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    By means described below, magnified views of portions of the images
    may be displayed. The text associated with such a view includes
    <tt><font size=+1>mag</font></tt>, the magnification. If the view is of a single character from
    a subfont, the second line of text shows the character&#8217;s value
    (including the subfont&#8217;s offset) in hexadecimal and as a
    character in <i>tweak&#8217;s</i> default font; the character&#8217;s <tt><font size=+1>x</font></tt>, <tt><font size=+1>top</font></tt>, <tt><font size=+1>bottom</font></tt>,
    <tt><font size=+1>left</font></tt>, and <tt><font size=+1>width</font></tt> as defined in <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>; and <tt><font size=+1>iwidth</font></tt>, the physical
    width of the image in the subfont&#8217;s image. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    There are two methods to obtain a magnified view of a character
    from a subfont. The first is to click mouse button 1 over the
    image of the character in the subfont. The second is to select
    the <tt><font size=+1>char</font></tt> entry on the button 3 menu, point the resulting gunsight
    cursor at the desired subfont and click button 3, and then type
    at the text prompt at the bottom of the screen the character value,
    either as a multi-digit hexadecimal number or as a single rune
    representing the character. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    To magnify a portion of other types of image files, click button
    1 over the unmagnified file. The cursor will switch to a cross.
    Still with button 1, sweep a rectangle, as in <tt><font size=+1>rio</font></tt>, that encloses
    the portion of the image to be magnified. (If the file is 16x16
    or smaller, <i>tweak</i> will just magnify the entire file; no sweeping
    is
    necessary.) 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Pressing buttons 1 and 2 within magnified images changes pixel
    values. By default, button 1 sets the pixel to all zeros and button
    2 sets the pixel to all ones. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Across the top of the screen is a textual display of global parameters.
    These values, as well as many of the textual values associated
    with the images, may be edited by clicking button 1 on the displayed
    value and typing a new value. The values along the top of the
    screen are:<br>
    <tt><font size=+1>mag</font></tt>&nbsp;&nbsp;&nbsp;Default magnification.<br>
    <tt><font size=+1>val(hex)<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        The value used to modify pixels within magnified images. The value
        must be in hexadecimal, optionally preceded by a tilde for bitwise
        negation.<br>
        
    </table>
    <tt><font size=+1>but1<br>
    but2</font></tt>The pixel value written when the corresponding button is pressed
    over a pixel.<br>
    <tt><font size=+1>invert&#8722;on&#8722;copy<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        Whether the pixel values are inverted when a <tt><font size=+1>copy</font></tt> operation is
        performed. 
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
        
    </table>
    Under button 3 is a menu holding a variety of functions. Many
    of these functions prompt for the image upon which to act by switching
    to a gunsight cursor; click button 3 over the selection, or click
    a different button to cancel the action.<br>
    <tt><font size=+1>open</font></tt>Read and display a file. The name of the file is typed to
    the prompt on the bottom line.<br>
    <tt><font size=+1>read</font></tt>Reread a file.<br>
    <tt><font size=+1>write<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        Write a file.<br>
        
    </table>
    <tt><font size=+1>copy</font></tt>Use the copy function, default <tt><font size=+1>S</font></tt>, to transfer a rectangle
    of pixels from one image to another. The program prompts with
    a cross cursor; sweep out a rectangle in one image or just click
    button 3 to select the whole image. The program will leave that
    rectangle in place and attach another one to the cursor. Move
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        that rectangle to the desired place in any image and click button
        3, or another button to cancel the action.<br>
        
    </table>
    <tt><font size=+1>char</font></tt>As described above, open a magnified view of a character image
    in a subfont.<br>
    <tt><font size=+1>pixels<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        Report the coordinate and value of individual pixels indicated
        by pressing button 3. This is a mode of operation canceled by
        pressing button 1 or 2.<br>
        
    </table>
    <tt><font size=+1>close<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        Close the specified image. If the image is the unmagnified file,
        also close any magnified views of that file.<br>
        
    </table>
    <tt><font size=+1>exit</font></tt>Quit <i>tweak</i>. The program will complain once about modified
    but unwritten files.<br>
    
</table>
<p><font size=+1><b>SOURCE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>/usr/local/plan9/src/cmd/draw/tweak.c<br>
    </font></tt>
</table>
<p><font size=+1><b>SEE ALSO     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>, <a href="../man7/font.html"><i>font</i>(7)</a><br>
    
</table>
<p><font size=+1><b>BUGS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    For a program written to adjust width tables in fonts, <i>tweak</i> has
    been pushed unreasonably far.<br>
    
</table>

<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>