|
|
1.1 ! root 1: .TH ART 1 ! 2: . \" /*% troff -man % | lp -du ! 3: .CT 1 graphics ! 4: .SH NAME ! 5: art, art2pic \- edit line-art ! 6: .SH SYNOPSIS ! 7: .B art ! 8: [ ! 9: .B -f ! 10: .I font ! 11: ] ! 12: [ ! 13: .B -b ! 14: .I picture ! 15: ] ! 16: .PP ! 17: .B art2pic ! 18: .I file ! 19: .SH DESCRIPTION ! 20: .I Art ! 21: is an interactive program to create precise line-art in the style of ! 22: .IR pic (1). ! 23: It is mostly mouse-operated, with a few commands entered from the keyboard. ! 24: It divides its window into four areas: ! 25: a menu bar at the top, ! 26: a one-line rectangle immediately below for echoing typed-in characters, ! 27: another one-line rectangle below that for printing messages, ! 28: and a large area at the bottom for displaying the drawing. ! 29: The ! 30: .B -b ! 31: option displays the specified ! 32: .I picture ! 33: (in the format of ! 34: .IR picfile (9.6)) ! 35: as a background for the drawing. ! 36: .PP ! 37: A small caret, whose apex is the ! 38: .IR "current point" , ! 39: appears on the screen. ! 40: The lines, arcs, and other elements of a drawing are ! 41: constructed by placing the caret at each of a sequence of points that define the ! 42: item. When the caret moves, two other markers (a square and a cross) trail it, ! 43: showing its previous positions. Items on the screen ! 44: near the caret attract it. Important points on items, like endpoints or ! 45: intersections, pull harder than more mundane points, making precise ! 46: alignment easy. ! 47: .PP ! 48: On request, ! 49: .I art ! 50: will automatically construct alignment lines and circles, ! 51: which it displays more faintly than items in the drawing. ! 52: Certain lines and points in a drawing are ! 53: .IR hot . ! 54: .I Art ! 55: constructs circles of given radii and lines of given slopes ! 56: at hot points, and parallels at given distances from hot lines ! 57: and lines at given angles to their endpoints. ! 58: Menus pulled down from the menu bar ! 59: control what alignment items are constructed. ! 60: Items are automatically heated when added to the drawing ! 61: and will be heated or cooled on command. ! 62: .PP ! 63: The `important points' on a line segment to which the ! 64: caret preferentially gravitates are its endpoints and midpoint. ! 65: On a circle, the center is important. ! 66: On an arc, the endpoints are important. ! 67: On a box, the corners, the midpoints of the sides and the center are important. ! 68: Likewise, on a piece of text, the corners, midpoints and center of its bounding ! 69: box are important. ! 70: On a spline, the control points are important, ! 71: and in a group, the important points of the group members are important. ! 72: .PP ! 73: Whenever button 1 is pressed, the caret follows the mouse cursor. ! 74: On release, the item the caret is touching, if any, is ! 75: selected and highlighted. If more than one item touches the caret, clicking button ! 76: 1 repeatedly will cycle through them. ! 77: .PP ! 78: Pressing button 2 pops up a menu of commands that add new items to the drawing. ! 79: Every item is described by several ! 80: .IR "control points" : ! 81: a line by its endpoints, a circular arc by its endpoints and a third point on the arc, ! 82: and so forth. A new item is specified by moving the caret in turn to each ! 83: control point but the last, selecting a menu entry with button two, then using ! 84: button 1 to place the caret ! 85: on the last control point. ! 86: (Buttons 2 and 3 will cancel the command.) ! 87: While the caret is being dragged to the last control point, ! 88: .I art ! 89: displays and updates the item on the screen (``rubber-banding''). ! 90: In all cases, after making an addition to the drawing, the new item becomes the ! 91: current selection. ! 92: The button 2 menu operations are ! 93: .TF parallels ! 94: .TP ! 95: .B line ! 96: Add a line segment to the drawing. The two control points are the segment's endpoints. ! 97: .TP ! 98: .B circle ! 99: Add a circle to the drawing. The first control point is the center. ! 100: The second is a point on the circumference. ! 101: .TP ! 102: .B arc ! 103: Add a circular arc to the drawing. The endpoints are the first and third control points. ! 104: The second control point is an interior point of the arc. ! 105: .TP ! 106: .B box ! 107: Add a rectangle to the drawing. The box's sides are vertical and horizontal. The ! 108: two control points are two diagonally opposite corners. ! 109: .TP ! 110: .B spline ! 111: Add a spline curve to the drawing, or extend an existing spline. ! 112: Splines are a little more complicated than other items because they may have any ! 113: number of control points. ! 114: If the current selection is not a spline, there are two control points \(em ! 115: the ends of a new spline. When a spline is selected, the ! 116: .B spline ! 117: button adds a new control point to the end of the spline closest to the selected point. ! 118: .TP ! 119: .B group ! 120: Add a group to the drawing. The two control points are the diagonally opposite ! 121: corners of a rectangle. ! 122: Any item partially or completely contained in the rectangle is made part of the group. ! 123: Henceforth the group acts as a monolithic item and may be moved, deleted or copied ! 124: as a unit. The ! 125: .BR open , ! 126: .B close ! 127: and ! 128: .B flatten ! 129: commands (on button 3) allow manipulation of the items within a group. ! 130: Groups may be nested within other groups. ! 131: .PP ! 132: Button 3's menu has commands to manipulate the current selection. ! 133: .TF parallels ! 134: .TP ! 135: .B delete ! 136: Remove the selection from the drawing. If the whole drawing is selected, ! 137: .I art ! 138: asks for confirmation by pressing mouse button 3. Buttons 1 and 2 cancel the command. ! 139: .TP ! 140: .B heat ! 141: Heat the selected item. ! 142: .TP ! 143: .B copy ! 144: Create a duplicate of the selected item. The duplicate must be dragged to its intended ! 145: position using button 1. Buttons 2 and 3 cancel the command. ! 146: .TP ! 147: .B edit ! 148: Change the indicated point of the selected item. Button 1 adjusts the point. ! 149: Buttons 2 and 3 cancel the command. This command's behavior depends on the ! 150: kind of item and the point at which it is selected. ! 151: .IP ! 152: If a line is selected near an endpoint, that endpoint moves and the other remains ! 153: fixed. Both endpoints of a line selected near its midpoint move\(emits length and ! 154: slope do not change. ! 155: .IP ! 156: If a circle selected at its center, it translates without changing its radius. ! 157: If selected on its circumference, its radius changes but its center remains fixed. ! 158: .IP ! 159: The control point of an arc or spline nearest the selection point is modified. ! 160: .IP ! 161: If a box is selected near a corner, that corner moves and the other remains fixed. ! 162: If selected near the middle of an edge, the edge moves, but the opposite edge remains ! 163: fixed. If selected near its center, the whole box moves without changing its size ! 164: or shape. ! 165: .IP ! 166: A group or a piece of text translates, regardless of the selection point. ! 167: .TP ! 168: .B open ! 169: The selection must be a group. All commands now operate on the members of the ! 170: group. ! 171: .TP ! 172: .B close ! 173: The most-recently opened group is closed. ! 174: Any changes made while it was open are propagated to other copies. ! 175: .TP ! 176: .B flatten ! 177: The selection must be a group. ! 178: The items in the group are inserted in its place in the drawing. ! 179: This undoes the effect of the ! 180: .B group ! 181: command. Other copies of the group are unaffected. ! 182: .PP ! 183: Keyboard commands: ! 184: .TF parallels ! 185: .TP ! 186: .B "t text ! 187: Add text to the drawing. The text is in the current font and is drawn centered ! 188: on the caret. ! 189: .TP ! 190: .BI "f " name ! 191: Set the current typeface. ! 192: .I Name ! 193: is the name of a font file. ! 194: Subdirectories of ! 195: .B /lib/font/bit ! 196: contain many appropriate fonts. ! 197: .TP ! 198: .B D ! 199: Redraw the display. ! 200: .TP ! 201: .B q ! 202: Quit. ! 203: .I Art ! 204: exits, without asking for confirmation. ! 205: .TP ! 206: .BR "w " [ \f2file\f1 ] ! 207: Write the drawing into a file in ! 208: .I art ! 209: format. ! 210: .I File ! 211: defaults to the last file mentioned in a read or write command. ! 212: .I Art ! 213: files may be converted to ! 214: .IR pic (1) ! 215: format by the ! 216: .I art2pic ! 217: command. ! 218: .TP ! 219: .BR "r " [ \f2file\f1 ] ! 220: Read a drawing from a file. ! 221: .I File ! 222: defaults to the last file mentioned in a read or write command. ! 223: .TP ! 224: .B c ! 225: Cool everything. Every hot item is cooled. ! 226: .TP ! 227: .B a ! 228: Select all items. The entire drawing is selected. ! 229: .TP ! 230: .B d ! 231: Drop anchor. The ! 232: .I anchor ! 233: is the fixed point for the not-yet-implemented rotate and scale commands. ! 234: .PP ! 235: Menus pulled down from the menu bar contain commands that alter how ! 236: .IR art ! 237: responds to user interaction. ! 238: .TF parallels ! 239: .TP ! 240: .B slopes ! 241: Most of the entries in this menu are numbers, representing angles in degrees. ! 242: Those that are marked with a star are the inclination from horizontal of alignment ! 243: lines constructed at each hot point of the drawing. Selecting a number toggles ! 244: the star on and off. The ! 245: .B measure ! 246: button measures the slope of the line connecting the most recent two points selected ! 247: with the caret. The measurement is printed, and a corresponding new entry is made ! 248: in the menu. ! 249: .TP ! 250: .B angles ! 251: This menu behaves much like the ! 252: .B slopes ! 253: menu. Items marked with a star are angles at which alignment lines are drawn ! 254: through the endpoints of hot lines. The ! 255: .B measure ! 256: button measures the angle indicated by the most recent three points selected with the caret. ! 257: .TP ! 258: .B parallels ! 259: Items marked with a star are distances at which alignment lines are drawn parallel ! 260: to hot lines. The ! 261: .B measure ! 262: button measures the distance between the most recent two points selected with the caret. ! 263: Distances are nominally in inches, but the program believes the display pitch to be ! 264: 100 pixels per inch. ! 265: .TP ! 266: .B circles ! 267: Items marked with a star are radii of alignment circles drawn with centers at ! 268: hot points. The ! 269: .B measure ! 270: button measures the distance between the most recent two points selected with the caret. ! 271: .TP ! 272: .B grid ! 273: Items in this menu activate a rectangular grid of gravitating points. ! 274: They have labels like ! 275: .BR 0,0+.1,.1 . ! 276: The first pair of numbers is the coordinate of a point on the grid; the other ! 277: pair is the ! 278: .I x ! 279: and ! 280: .I y ! 281: displacements of other points. ! 282: The ! 283: .B off ! 284: item disables the grid (the default situation). ! 285: .B Measure ! 286: creates a custom-measured grid using the last two positions of the caret as ! 287: diagonally adjacent grid-points. ! 288: .TP ! 289: .B gravity ! 290: The starred entry on this menu is the maximum distance that the caret will move from ! 291: the mouse cursor to snap to an item on the screen. ! 292: .TP ! 293: .B heating ! 294: The ! 295: .B "heat new ! 296: button toggles whether objects are automatically heated when created or modified. ! 297: The item is marked with a star if set, as it is initially. ! 298: .SH SOURCE ! 299: .B /sys/src/cmd/art ! 300: .SH "SEE ALSO" ! 301: .IR tweak (1) ! 302: .SH BUGS ! 303: Needs two or more bits per pixel. ! 304: Doesn't compute intersections of splines with circles or arcs. ! 305: No filled regions, line styles or arrowheads. ! 306: Doesn't save construction lines in files. ! 307: Because it draws in xor mode when rubber-banding, lines can momentarily disappear. ! 308: Tracks slowly in large drawings.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.