| <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 – 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’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’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’s value |
| (including the subfont’s offset) in hexadecimal and as a |
| character in <i>tweak’s</i> default font; the character’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’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> 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−on−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> |