NAME
|
art, art2pic – edit line–art |
SYNOPSIS
|
art [ –f font ] [ –b picture ]
art2pic file |
DESCRIPTION
|
Art is an interactive program to create precise line–art in the
style of pic(1). It is mostly mouse–operated, with a few commands
entered from the keyboard. It divides its window into four areas:
a menu bar at the top, a one–line rectangle immediately below for
echoing typed–in characters, another one–line rectangle
below that for printing messages, and a large area at the bottom
for displaying the drawing. The –b option displays the specified
picture (in the format of picfile(9.6)) as a background for the
drawing. A small caret, whose apex is the current point, appears on the screen. The lines, arcs, and other elements of a drawing are constructed by placing the caret at each of a sequence of points that define the item. When the caret moves, two other markers (a square and a cross) trail it, showing its previous positions. Items on the screen near the caret attract it. Important points on items, like endpoints or intersections, pull harder than more mundane points, making precise alignment easy. On request, art will automatically construct alignment lines and circles, which it displays more faintly than items in the drawing. Certain lines and points in a drawing are hot. Art constructs circles of given radii and lines of given slopes at hot points, and parallels at given distances from hot lines and lines at given angles to their endpoints. Menus pulled down from the menu bar control what alignment items are constructed. Items are automatically heated when added to the drawing and will be heated or cooled on command. The `important points' on a line segment to which the caret preferentially gravitates are its endpoints and midpoint. On a circle, the center is important. On an arc, the endpoints are important. On a box, the corners, the midpoints of the sides and the center are important. Likewise, on a piece of text, the corners, midpoints and center of its bounding box are important. On a spline, the control points are important, and in a group, the important points of the group members are important. Whenever button 1 is pressed, the caret follows the mouse cursor. On release, the item the caret is touching, if any, is selected and highlighted. If more than one item touches the caret, clicking button 1 repeatedly will cycle through them.
Pressing button 2 pops up a menu of commands that add new items
to the drawing. Every item is described by several control points:
a line by its endpoints, a circular arc by its endpoints and a
third point on the arc, and so forth. A new item is specified
by moving the caret in turn to each control point but the last,
selecting a menu entry with button two, then using button 1 to
place the caret on the last control point. (Buttons 2 and 3 will
cancel the command.) While the caret is being dragged to the last
control point, art displays and updates the item on the screen
(``rubber–banding''). In all cases, after making an addition to
the drawing, the new item becomes the current selection. The button
2 menu operations are
delete Remove the selection from the drawing. If the whole drawing is selected, art asks for confirmation by pressing mouse button 3. Buttons 1 and 2 cancel the command. heat Heat the selected item. copy Create a duplicate of the selected item. The duplicate must be dragged to its intended position using button 1. Buttons 2 and 3 cancel the command. edit Change the indicated point of the selected item. Button 1 adjusts the point. Buttons 2 and 3 cancel the command. This command's behavior depends on the kind of item and the point at which it is selected.
close The most–recently opened group is closed. Any changes made while it was open are propagated to other copies. flatten The selection must be a group. The items in the group are inserted in its place in the drawing. This undoes the effect of the group command. Other copies of the group are unaffected.
Keyboard commands:
Menus pulled down from the menu bar contain commands that alter
how art responds to user interaction.
parallels Items marked with a star are distances at which alignment lines are drawn parallel to hot lines. The measure button measures the distance between the most recent two points selected with the caret. Distances are nominally in inches, but the program believes the display pitch to be 100 pixels per
grid Items in this menu activate a rectangular grid of gravitating points. They have labels like 0,0+.1,.1. The first pair of numbers is the coordinate of a point on the grid; the other pair is the x and y displacements of other points. The off item disables the grid (the default situation). Measure creates
heating The heat new button toggles whether objects are automatically heated when created or modified. The item is marked with a star if set, as it is initially. |
SOURCE
|
/sys/src/cmd/art |
SEE ALSO
|
tweak(1) |
BUGS
| Needs two or more bits per pixel. Doesn't compute intersections of splines with circles or arcs. No filled regions, line styles or arrowheads. Doesn't save construction lines in files. Because it draws in xor mode when rubber–banding, lines can momentarily disappear. Tracks slowly in large drawings. |