man.bsd.lv manual page server

Manual Page Search Parameters

GREMLIN(1) General Commands Manual GREMLIN(1)

gremlin - picture editor

gremlin [ -g <display> -h -v -p <path> ] [ file ]

Gremlin is an interactive picture editor for producing line drawings. It is currently configured to run on an AED512 display with a corresponding text terminal. Commands are included for drawing simple elements such as polygon, circles, and text in a variety of fonts or line styles. Elements can also be grouped together and manipulated as sets. More a more detailed description, see the gremlin users manual.


The switches available are:


-g display
specifies the graphics terminal device name to be used for displaying the picture. If not given, gremlin selects a display that should be appropriate. -h
specifies the drawing area is to be horizontal (default is vertical) with the menu displayed across the top. -v
specifies a vertical (default) orientation for the drawing area with the menu displayed along the left hand side. -p path
specifies the path to be used by gremlin for file look-ups (see the path command for a discussion of paths). If the -p switch isn't specified, then a default path of '.' is used.



Commands are entered by menu selection or from the keyboard. Menu selection is accomplished by placing the cursor on or near the icon associated with the desired command and pressing the command button (yellow).
The cursor is moved by a 'mouse' on the digitizer. The mouse has four buttons: green, white, yellow, and blue used to place points, delete points, invoke commands, and undo commands respectively.
Most commands are accomplished by specifying 1 or more temporary points and performing some action on the points. If the user puts down more points than are used by the command, the excess points are discarded.
Text commands may be either short, single character commands or longer commands which must be preceded by a ':'. The characters for the short commands are not necessarily mnemonic and were selected for convenience of typing. With a few exceptions, all of the short commands lie under the left hand during normal typing.
Following is a list of the commands available under gremlin and an explanation of their use.
^L - Update Screen.
The delete command may leave blank spots on the screen where objects overlapped. These blank spots do not actually exist in the picture and can be properly observed by updating the screen.

! - Shell escape.
This command interprets the remainder of the line on which it is typed as a command to the UNIX shell.

1,2,3,4 - Save current set in set buffer.
The current set is copied into the specified set buffer for possible later retrieval.

a - Draw Arc.
The command uses 3 points to define an arc. The first point determines the center of a circle. The second defines a radius and, thus, is a point on the circle. The third point is optional and, if specified, determines a counter-clockwise angle from the second point which is the extent of the arc. If the third point is omitted, or the angle is 0, a full circle is drawn.

b - Draw curve.
Draw a smooth curve through the specified points.

c - Copy Current Set.
Copying uses 2 or more points. Copying is similar to translation except that a copy of the current set is displaced to each of the remaining points.

d - Define Current Set.
This command uses points to select elements for the current set. The points should be near, or touching, the reference points of the desired elements. (gravity can be used to aid when laying down the points). If no points are specified, the entire picture becomes the current set. The previous contents of the current set are no longer selected.

e - Erase.
This command erases all elements currently defined in the current set.

f - Select Area for Current Set
Two points are used to define a rectangle (the points are the endpoints of the diagonal of the rectangle). All elements which lie entirely within the rectangle are selected to define the current set. The previous elements of the current set are no longer selected. The rectangle is not displayed.

g - Gravity.
This command toggles each time the command is invoked. When on, gravity forces a point to coincide with the nearest existing point or reference point. Gravity will only take effect, however, if the cursor is near enough to an element in the picture.

l - update text screen.
This command causes the text screen to be cleared and redisplayed.

q - Display Grid.
This command also toggles each time it is invoked. The display grid command causes a grid to appear on the graphic screen. The grid spacing is 16 pixels.

r - Rotate Current Set
Three points are used to define a rotation. The rotation is performed, relative to the first point, through an angle formed by the lines between points 1 and 2 and points 1 and 3 respectively.

s - Scale Current Set.
Scaling uses three points to define a transformation. The current set in scaled by the ratio of the distances between the first and second and the first and third points.

t - Translate (move) Current Set.
This command uses 2 points. The current set is displaced by the relative distance between the points.

v - Draw Vectors.
Connects each of the points laid down, in the order specified, with lines.

w - Draw arrowhead.
This command uses two points. The first point represents the point in the picture where the tip of the arrowhead is to be drawn. The second point indicates the direction the arrow is to point.

x - Draw box
This command uses two points defining the endpoints of the diagonal of a rectangle and draws that rectangle.

z - Manhattan Adjust.
This command combines horizontal and vertical adjustment to automatically force each point to be directly horizontal or vertical with respect to the previous point, whichever it is closer to.

:align n - Alignment.
This command forces points to be aligned on pixel boundaries as specified by the parameter (i.e. if alignment is 10, all points will fall at pixels with addresses evenly divisible by 10). If no parameter is specified, the alignment will toggle between 1 and the grid size.

:brush n - Select brush n.
Currently, there are 6 brush types available called 'dotted', 'broken',  'thick', 'dashed', 'narrow', and 'medium'. The brushes may also be selected by a number, 1-6, in the above order.

:buffer n - Retrieve set buffer.
This command provides a means for selecting the sets stored in buffers from the keyboard. The menu symbols are numbered top to bottom, left to right. This command requires one or more positioning points to indicate where in the picture the buffer is to be copied, and a copy of the buffer is made at each point.

:clearpoints - Clear points.
The :clearpoints command is used to clear (remove) the unused points on the screen.

:deletepoint - Delete point.


This command erases the last point specified (same as the delete point button on the cursor).

:edit - Edit file.
This command causes a new file to be opened for editing. The state of the current picture is not preserved except that any symbols defined in the menu buffers are maintained.

:font n - Select font n.
The fonts are selected by a name of Roman, Italics, Bold, or Special respectively. Fonts may also be specified by an integer between 1 and 4 according to the above order.

:gripe - Leave a message.
This command is included to leave a message for the person maintaining the gremlin picture editor. The user is placed in the UNIX mail command.

:hadjust - Horizontal Adjust.
This mode is toggled (on or off) each time the command is invoked. When on, horizontal adjustment forces each point laid down to lie on a horizontal line from the previous point (i.e. only horizontal displacement of the cursor is used).

:includeset - Include in Current Set
The selected elements are added to the current set along with whatever elements currently comprise the set.

:justify - Text justification mode
This command specifies the current text justification mode. Text can be justified at the bottom, center, or top vertically and at the left, center, or right horizontally. The justification is specified as a 2 character code representing the horizontal and vertical justification mode. The characters can be entered in either order, upper or lower case, but should not be separated by spaces. Ex: To justify a string at the left and bottom, the justification code could be entered as 'BL', 'bl', 'LB', or 'lb'.

:littlepoint - Point size control
This command toggles the point display between the standard "+" followed by an integer and a smaller "+" with no number.

:mbrush brush - Modify brush.
This command causes the picture elements in the current set to be redrawn with a new brush.

:mfont font - Modify font.
This command causes any text picture elements in the current set to be redisplayed in a new font.

:mirror - mirror current set.
Three points are also used to define a mirroring. The mirroring takes place about the x and/or y axes respectively if the third point is on the opposite side of the first from the second in the x or y direction.

:mpoint - Move point.
This command uses one or more points and causes the element of the current set which contains the point closest to the first of these points to be redrawn with that point replaced with the remaining points.

:msize size - Modify size.
This command causes any text picture elements in the current set to be redisplayed in a new character size.

:mtext text - Modify text.
This command causes any text picture elements in the current set to be replaced with the text string specified.

:orient - Toggle orientation.
This command causes screen orientation to toggle between horzontal and vertical.

:path string Set path. The search path contains the names of one or more directories that gremlin will examine in order when opening files for reading, it searches for the file in each of the directories in the path until the open succeeds. If no directory in the path contains the file, one more attempt will be made to read the file from the gremlin library. If the original file name begins with a "~" or "/" then the path mechanism is bypassed and gremlin searches only in one place.
String contains one or more directory names separated by colons (":"). Directories may be specified using the "~" notation and "::" is equiavlent to ":.:". If string is not specified, the current path is printed. The search path mechanism is used only for reading files.

:point x y - Place point.
This command is used as a means for placing points in the picture area from the text terminal similar to the green mouse button. X and y are the coordinates of the point to be placed.

:quit - Quit.
Quit ends the edit session.

:read filename - Read Picture file
The symbol defined in file filename is read into the picture as the current set.

:saveset filename - Write the current set.
Write out the current set to the specified file.

:showpoints - Show reference points.
Display reference points of all elements in the current set.

:size n - Select size n.
This command chooses the size of the current font. The user has a choice of 4 sizes designated by integers 1 though 4. By convention, size 1 is usually the smallest and 4, the largest, but it is not necessary that they be printed that way when hard copy is produced.

:text string - Insert Text
Text the string is added to the picture appropriately justified (as determined by the current text justification mode) on the point or points specified. Text is entered following the command (but preceded by a space) and is terminated by a carriage return.

:undo - undo last command.
This command undoes the last command (even if it was an undo command) the same as the blue mouse button.

:vadjust - Vertical Adjust.
This command is similar to horizontal adjust except that points are forced vertical from their predecessors.

:write filename - Write edit file.
Write out the picture to the current or specified edit file.

gprint(1)
The Gremlin Picture Editor -- users manual.

Barry Roitblat

4th Berkeley Distribution