167 lines · 4.7 KB · Text
RawDownload
.TH TWEAK 1.CT 1 graphics.SH NAMEtweak \- edit image files, subfont files, face files, etc..SH SYNOPSIS.B tweak[.I file ...].SH DESCRIPTION.I Tweakedits existing files holding various forms of images.To create original images, start from an existing image, subfont, etc..PP.I Tweakreads its argument.I filesand displays the resulting images in a vertical column.If the image is too wide to fit across the display, itis folded much like a long line of text in an.IR riowindow.Under each image is displayed one or two lines of textpresenting its parameters.The first line shows the image's.BR depth ,the numberof bits per pixel;.BR r ,the rectangle covered by the image;and the name of the.B filefrom which it was read.If the file is a subfont, a second line presents a hexadecimal 16-bit.B offsetto be applied to character values from the subfont(typically as stored in a font file; see.IR font (6));and the subfont's.BR n ,.BR height ,and.B ascentas defined in.IR cachechars (2)..PPBy means described below, magnified views of portions of the imagesmay be displayed.The text associated with such a view includes.BR mag ,the magnification.If the view is of a single character from a subfont, the secondline of text shows the character's value (including the subfont's offset)in hexadecimal and as a character in.I tweak'sdefault font; the character's.BR x ,.BR top ,.BR bottom ,.BR left ,and.BR widthas defined in.IR cachechars (2);and.BR iwidth ,the physical width of the image in the subfont's image..PPThere are two methods to obtain a magnified view of a character from asubfont.The first is to click mouse button 1 over the image of the character inthe subfont.  The second is to select the.B charentry 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 thecharacter value, either as a multi-digit hexadecimal number or as a singlerune representing the character..PPTo 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.BR rio ,that encloses the portion of the image to be magnified.(If the file is 16×16 or smaller,.I tweakwill just magnify the entire file; no sweeping is necessary.).PPPressing 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 pixelto all ones..PPAcross the top of the screen is a textual display of global parameters.These values, as well as many of the textual values associated withthe images, may be edited by clicking button 1 on the displayedvalue and typing a new value.The values along the top of the screen are:.TP.B magDefault magnification..TP.B val(hex)The value used to modify pixels within magnified images.The value must be in hexadecimal, optionally preceded by atilde for bitwise negation..TP.B but1.TP.B but2The pixel value written when the corresponding button is pressed over a pixel..TP.B invert-on-copyWhether the pixel values are inverted when a.B copyoperation is performed..PPUnder button 3 is a menu holding a variety of functions.Many of these functions prompt for the image upon which to actby switching to a gunsight cursor; click button 3 over theselection, or click a different button to cancel the action..TP.B openRead and display a file.  The name of the file is typed to the prompton the bottom line..TP.B readReread a file..TP.B writeWrite a file..TP.B copyUse the copy function, default.BR S ,to transfer a rectangle of pixels from one image to another.The program prompts with a cross cursor; sweep out a rectangle inone image or just click button 3 to select the whole image.The program will leave that rectangle in place andattach another one to the cursor.  Move that rectangle to the desiredplace in any image and click button 3, or another button to cancel the action..TP.B charAs described above, open a magnified view of a character image in a subfont..TP.B pixelsReport 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..TP.B closeClose the specified image.If the image is the unmagnified file, also close any magnified views of that file..TP.B exitQuit.IR tweak .The program will complain once about modified but unwritten files..SH SOURCE.B /sys/src/cmd/tweak.c.SH "SEE ALSO".IR cachechars (2),.IR image (6),.IR font (6).SH BUGSFor a program written to adjust width tables in fonts,.I tweakhas been pushed unreasonably far.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t