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