SysIII/usr/src/man/docs/graf_ged

.ds :? Graphical Editor Tutorial
.PH "''''"
.OH "'\s9\f2\*(:?\fP''\\\\nP\s0'"
.EH "'\s9\\\\nP''\f2\*(:?\^\fP\s0'"
.TL
A Tutorial Introduction to the Graphical Editor
.AU "Alan R. Feuer" ARF PY 3782 7016 2F-202
.MT 4 1
.bd S B 3
.ta 3i +.5i +.5i +.5i +.5i

.de CN
.br
\\fR\\(**\\fB\\$1\\fR\\$2 \\fB\\$3
..
.de MC
\\fR<\\fB\\$1\\fR>
.if \\$2=1 .br
..
.de CO
.br
.sp -1
.if \\$2=1 \\h'1i'
\\h'2.5i'(\\$1)
.br
..
.sp 4
.H 1 INTRODUCTION
.I Ged
is an interactive graphical editor used to display,
edit, and construct drawings on Tektronix\(rg 4010 series display terminals.
The drawings are represented as a sequence of objects in a token language
known as \s-1GPS\s+1 (for graphical primitive string).
\s-1GPS\s+1 is produced by the drawing commands in \s-1PWB\s+1/Graphics [1]
such as \fIvtoc\fR and \fIplot\fR as well as by \fIged\fR itself.
.P
The examples in this tutorial illustrate how to construct and edit simple drawings.
Try them to become familiar with how the editor works,
but keep in mind that \fIged\fR is intended primarily to edit the output
of other programs rather than to construct drawings from scratch.
A summary of editor commands and options is given in Section 3.
.P
As for notation,
literal keystrokes are printed in \fBboldface\fR.
Meta-characters are also in boldface and are surrounded
by angled brackets.
For example,
<\fBreturn\fR> means return and <\fBsp\fR> means space.
In the examples,
output from the terminal is printed in normalface type.
Inline comments are in normalface and are surrounded by parentheses.
.tr ~.

.H 1 "COMMANDS"
To start we will assume that you have
successfully entered
the graphics environment (as described in \fIgraphics\fR(1) of [2])
while logged in at a display terminal.
To enter \fIged\fR type
.DS 1 1
.B ged
.MC return 1
.DE
After a moment the screen should be clear save for the
.I ged
prompt, \fB\(**\fR,
in the upper left corner.
The \fB\(**\fR tells you that
.I ged
is ready to accept a command.
.P
Each command passes through a sequence of stages during
which you describe what the command is to do.
All commands pass through a subset of these stages:
.AL 1 .8i
.LI
.I "command line"
.LI
.I "text"
.LI
.I "points"
.LI
.I "pivot"
.LI
.I "destination"
.LE
.sp
As a rule, each stage is terminated by typing
.MC return
~
The
.MC return
for the last stage of a command triggers execution.
.H 2 "The Command Line"
The simplest commands consist only of a
.I "command line."
The
.I "command line"
is modeled after a conventional command line in the
.I Shell.
That is
.DS 1 1
\fIcommand-name\fR [\fB\-\fIoption\fR(s)] [\fIfilename\fR]
.MC return
.DE
.I ?
is an example of a simple command.
It lists the commands and options understood by
.I ged.
Type
.DS 1 1
.CN ?
.MC return
.CO "you type a question mark followed by a return"
.DE
to generate the list.
.P
A command is executed by typing the first character
of its name.
.I Ged
will echo the full name and wait for the rest of the
.I "command line."
For example,
.B e
references the
.I erase
command.
As
.I erase
consists only of stage 1,
typing
.MC return
causes the erase action to occur.
Typing
.MC rubout
after a command name and before the
final
.MC return
for the command aborts the command.
Thus while
.DS 1 1
.CN e rase
.MC return
.DE
erases the display screen,
.DS 1 1
.CN e rase
.MC rubout
.DE
brings the editor back to \fB\(**\fR.
.P
Following the command-name,
.I "options"
may be entered.
Options control such things as the width and style of lines to be drawn
or the size and orientation of text.
Most options have a default value that applies if a value for the option is not
specified on the command line.
The
.I set
command allows you to examine and modify the default values.
Type
.DS 1 1
.CN s et
.MC return
.DE
to see the current default values.
.P
The value of an option is either of type integer, character, or Boolean.
Boolean values are represented by
.B +
for true and
.B \-
for false.
A default value is modified by providing it as an
option to the
.I set
command.
For example,
to change the default text height to 300
units type:
.DS 1 1
.CN s et
\-h300
.MC return
.DE
Arguments on the command line,
but not the command-name,
may be edited using the erase and kill
characters from the 
.I Shell.
(Actually, this applies whenever text is being entered.)
.H 2 "Constructing Graphical Objects"
Drawings are stored as \s-1GPS\s+1 in a
.I "display buffer"
internal to the editor.
Typically, a drawing in
.I ged
is composed of instances of three graphical primitives:
.I "arc, lines,"
and
.I text.
.H 3 "Generating text."
To put a line of text on the display screen use the
.I Text
command.
First enter the
.I "command line"
(stage 1):
.DS 1 1
.CN T ext
.MC return
.DE
Next enter the
.I text
(stage 2):
.DS 1 1
.B "a line of text"
.MC return
.DE
And then enter the starting \fIpoint\fR for the text (stage 3):
.DS 1 1
.MC "position cursor"
.MC "return"
.DE
Positioning of the graphic cursor
is done either with the thumbwheel knobs on the terminal keyboard
or with an auxiliary joystick.
The
.MC return
establishes the location of the
cursor to be the starting point for the text string.
The
.I Text
command ends at stage 3,
so this
.MC return
initiates the drawing of the text string.
.P
.I Text
accepts options
to vary the angle, height, and line width of the characters,
and to either center or right justify the text object.
The text string may span more than one line by escaping the
.MC return
(i.e., \fB\e\fR<\fBreturn\fR>) to indicate continuation.
To illustrate some of these capabilities, try the following:
.DS 1 1
.CN T ext
\-r
.MC return
.CO "right justify text"
.B "top\e\h'-1n'"
.MC return 1
.B right
.MC return 1
.MC "position cursor"
.MC return 1
.CN T ext
\-a90
.MC return
.CO "rotate text 90 degrees"
.B "lower\e\h'-1n'"
.MC return 1
.B left
.MC return 1
.MC "position cursor"
.MC return
.CO "pick a point below and left of the previous point"
.DE
.DS
.sp 2i
.FG "Generating text objects"
.sp
.DE
.H 3 "Drawing lines."
The
.I Lines
command is used to construct objects built from a sequence
of straight lines.
It consists of stages 1 and 3.
Stage 1 is straightforward:
.DS 1 1
.CN L ines
.I "possible options"
.MC return
.DE
.I Lines
accepts options to specify line style and line width.
.P
Stage 3, the entering of
.I points,
is more interesting.
.I Points
are referenced either with the graphic cursor or by name.
We have already entered a
point
with the cursor for the
.I Text
command.
For
.I Lines
it is more of the same.
As an example,
let us build a triangle:
.DS 1 1
.CN L ines
.MC return 1
.MC "position cursor"
.MC sp
.CO "locate the first point"
.MC "position cursor"
.MC sp
.CO "the second point"
.MC "position cursor"
.MC sp
.CO "the third point"
.MC "position cursor"
.MC sp
.CO "back to the first point"
.MC return
.CO "terminate \fIpoints\fR, draw triangle"
.DE
Typing
.MC sp
enters the location of the crosshairs as a point.
.I Ged
identifies the point
with an integer and adds the location to
the current
.I "point set."
The last point
entered can be erased by typing
.B "#"
~
The current
point set
can be cleared by typing
.B "@"
~
On receiving the final
.MC return
the points are connected in numerical order.
.H 4 "Accessing points by name."
The points
in the current point set
may be referenced by name using the
.B $
operator.
\fB$\fIn\fR references the point
numbered
.I n.
Using
.B $
we can redraw the triangle of Section 2.2.2 by entering:
.DS 1 1
.CN L ines
.MC return 1
.MC "position cursor"
.MC sp 1
.MC "position cursor"
.MC sp 1
.MC "position cursor"
.MC sp 1
.B $0
.MC return
.CO "reference point \fB0\fR"
.MC return 1
.DE
.DS
.sp 3i
.FG "Building a triangle"
.sp
.DE
.P
At the start of each command that includes stage 3, \fIpoints\fR, the
current point set
is empty.
The point set
from the previous command is saved and is accessible using
the \fB.\fR operator.
\fB~\fR swaps the points in the previous point set with those in the current set.
The \fB=\fR operator can be used to identify the current points.
To illustrate,
let us use the triangle just entered as the basis for drawing
a quadrilateral:
.DS 1 1
.CN L ines
.MC return 1
.B .
.CO "access the previous point set"
.B =
.CO "identify the current points"
.B #
.CO "erase the last point"
.MC "position cursor"
.MC sp
.CO "add a new point"
.B $0
.MC return
.CO "close the figure"
.MC return 1
.DE
.DS
.sp 3i
.FG "Accessing the previous point set"
.sp
.DE
.P
Individual points
from the previous
point set
can be referenced by using the
.B .
operator with
.B $.
We will build a triangle that shares an edge with the
quadrilateral:
.DS 1 1
.CN L ines
.MC return 1
.B $.1
.MC return
.CO "reference point 1 from the previous point set"
.B $.2
.MC return
.CO "reference point 2"
.MC sp
.CO "enter a new point"
.B $0
.MC return
.CO "or \fB$.1\fR, to close the figure"
.MC return
.DE
.DS
.sp 3.5i
.FG "Referencing points from the previous point set"
.DE
.P
A point can also be given a name.
The \fB>\fR operator allows you to associate an upper case
letter with a point just entered.
A simple example is:
.DS 1 1
.CN L ines
.MC return 1
.MC "position cursor"
.MC "sp"
.CO "enter a point"
.B >A
.CO "name the point \fBA\fR"
.MC "position cursor"
.MC sp 1
.MC return
.DE
In commands that follow you can now reference point A
using the \fB$\fR operator, as in:
.DS 1 1
.CN L ines
.MC return 1
.B $A
.br
.MC "position cursor"
.MC sp 1
.MC return
.DE
.H 3 "Drawing curves."
Curves are interpolated from a sequence of three
or more points.
The \fIArc\fR command generates a circular arc given three points
on a circle.
The arc is drawn starting at the first point,
through the second point,
and ending at the third point.
A circle is an arc with the first and third points coincident.
One way to draw a circle is thus:
.DS 1 1
.CN A rc
.MC return 1
.MC "position cursor"
.MC sp 1
.MC "position cursor"
.MC sp 1
.B $0
.MC return 1
.MC return
.DE
.H 2 "Editing Objects"
.H 3 "Addressing objects."
An object is addressed by pointing to one of its
.I handles.
All objects have an
.I object-handle.
Usually the object-handle is the first point entered when
the object was created.
The
.I objects
command marks the location of each object-handle with an
.B O.
Type
.DS 1 1
.CN o bjects \-v
.MC return 1
.DE
to see the handles of all the objects on the screen.
.P
Some objects,
.I Lines
for example,
also have
.I point-handles.
Typically each of the points entered when an object is constructed
becomes a point-handle.
(Yes, an object-handle is also a point-handle.)
The
.I points
command marks each of the point-handles.
.P
A handle is pointed to by including it
within a
.I defined-area.
A defined-area is generated either with a command line option
or interactively using the graphic cursor.
As an example, try deleting one of the objects you have created
on the screen.
.DS 1 1
.CN D elete
.MC return 1
.MC "position cursor"
.MC sp
.CO "above and to the left of some object-handle"
.MC "position cursor"
.MC sp 1
.CO "below and to the right of the object-handle"
.MC return
.CO "the defined-area should include the object-handle"
.MC return
.CO "if all is well, delete the object"
.DE
.sp
The defined-area is outlined with dotted lines.
The reason for the seemingly extra
.MC return
at the end of the
.I Delete
command is to give you an opportunity to stop the command
(using <\fBrubout\fR>) if the defined-area is not quite right.
Every command that accepts a defined-area will wait for a confirming
.MC return
~
Use the
.I new
command to get a fresh copy of the remaining objects.
.P
Notice that defined-areas are entered as
.I points 
in the same way that objects are created.
Actually, a defined-area may be generated by giving anywhere
from zero to 30 points.
Inputting zero points is particularly useful to point to a single handle.
It creates a small defined-area about the location of the terminating
.MC return
~
Using a zero point defined-area, the
.I Delete
command would be:
.DS 1 1
.CN D elete
.MC return 1
.MC "position cursor"
.CO "center the crosshairs on the object-handle"
.MC return
.CO "terminate the defined-area"
.MC return
.CO "delete the object"
.DE
.sp
.P
A defined-area can also be given as a command line option.
For example, to delete everything in the display buffer give the \fBu\fRniverse option
to the
.I Delete
command.
Note the difference between the commands
\fBD\fRelete \fB\-u\fR and \fBe\fRrase.
.H 3 "Changing the location of an object."
Objects are moved using the \fIMove\fR command.
Create a circle using \fIArc\fR, then move it as follows:
.DS 1 1
.CN M ove
.MC return 1
.MC "position cursor"
.MC return
.CO "centered on the object-handle"
.MC return
.CO "this establishes a \fIpivot\fR, marked with an asterisk"
.MC "position cursor"
.MC return
.CO "this establishes a \fIdestination\fR"
.DE
.sp
The basic move operation relocates every point in each object
addressed by the distance from the \fIpivot\fR to the \fIdestination\fR.
In this case we chose the pivot to be the object-handle,
so effectively we moved the object-handle to the destination point.
.H 3 "Changing the shape of an object."
The
.I Box
command is a special case of generating lines.
Given two points it creates a rectangle such that the
two points are at opposite corners.
The sides of the rectangle lie parallel to the edges of the screen.
Draw a box:
.DS 1 1
.CN B ox
.MC return 1
.MC "position cursor"
.MC sp 1
.MC "position cursor"
.MC return 1
.DE
.I Box
generates point-handles at each vertex of the rectangle.
Use the \fIpoints\fR command to mark the point-handles.
The shape of an object can be altered by moving point-handles.
The next example illustrates one way to double the height of a box.
.DS 1 1
.CN M ove \-p+
.MC return 1
.MC "position cursor"
.MC sp
.CO "left of the box, between the top and bottom edges"
.MC "position cursor"
.MC return
.CO "right of the box, below the bottom edge"
.MC "position cursor"
.MC return
.CO "on the top edge"
.MC "position cursor"
.MC return
.CO "directly below on the bottom edge"
.DE
.DS
.sp 3.75i
.FG "Growing a box"
.sp
.DE
Since the \fBp\fRoints flag is true, the operation is applied to each point-handle addressed.
In this case each point-handle within the defined-area is
moved the distance from the pivot to the destination.
If \fBp\fR were false only the object-handle would have been addressed.
.H 3 "Changing the size of an object."
The size of an object can be changed using the
.I Scale
command.
.I Scale
scales objects by changing the distance from each handle of the object
to a pivot by a factor.
Put a line of text on the screen and try the following
.I Scale
commands:
.DS 1 1
.CN S cale \-f200
.MC return
.CO "factor is in percent"
.MC "position cursor"
.MC return
.CO "point to object-handle"
.MC "position cursor"
.MC return
.CO "set pivot to rightmost character"
.MC return 1
.sp
.CN S cale \-f50
.MC return 1
.B .
.MC return
.CO "reference the previous defined-area"
.MC "position cursor"
.MC return
.CO "set pivot above a character near the middle"
.MC return 1
.DE
.DS
.sp 2i
.FG "Scaling text"
.sp
.DE
A useful insight into the behavior of scaling
is to note that the position of the pivot does not change.
Also observe that the defined-area is scaled to preserve
its relationship to the graphical objects.
.P
The size of objects can also be changed by moving point-handles.
Generate a circle, this time using the
.I Circle
command:
.DS 1 1
.CN C ircle
.MC return 1
.MC "position cursor"
.MC sp
.CO "specify the center"
.MC "position cursor"
.MC return
.CO "specify a point on the circle"
.DE
.I Circle
generates an arc with the first and third
point at the point specified on the circle.
The second point of the arc is located 180\(de
around the circle.
One way to change the size of the circle is to
move one of the point-handles (using \fBM\fRove \fB\-p\fR).
.P
The size of text characters can be changed via a third mechanism.
Character height is a property of a line of text.
The
.I Edit
command allows you to change character height as follows:
.DS 1 1
.CN E dit \-h\fIheight\fR
.MC return
.CO "\fIheight\fR is in universe units, see Section 2.4"
.MC "position cursor"
.MC return
.CO "point to the object-handle"
.MC return 1
.DE
.H 3 "Changing the orientation of an object."
The orientation of an object can be altered using
.I Rotate.
.I Rotate
rotates each point of an object about a pivot by an angle.
Try the following rotations on a line of text:
.DS 1 1
.CN R otate \-a90
.MC return
.CO "angle is in degrees"
.MC "position cursor"
.MC return
.CO "point to object-handle"
.MC "position cursor"
.MC return
.CO "set pivot to rightmost character"
.MC return
.sp
.CN R otate \-a\-90
.MC return 1
.B .
.MC return
.CO "reference previous defined-area"
.MC "position cursor"
.MC return
.CO "set pivot to a character near the middle"
.MC return 1
.DE
.DS
.sp 3i
.FG "Rotating text"
.sp
.DE
.H 3 "Changing the style or width of lines."
In the current editor
objects can be drawn from lines in any of
five styles (\fBso\fRlid, \fBda\fRshed, \fBd\fRot-\fBd\fRashed,
\fBdo\fRtted, \fBl\fRong-\fBd\fRashed)
and three widths (\fBn\fRarrow, \fBm\fRedium, \fBb\fRold).
Style is controlled by the \fBs\fR option,
width by \fBw\fR.
.DS 1 1
.CN L ines \-wn,sdo
.MC return 1
.MC "position cursor"
.MC sp 1
.MC "position cursor"
.MC sp 1
.MC return 1
.DE
creates a narrow width dotted line.
.DS 1 1
.CN E dit \-wb,sdd
.MC return 1
.MC "position cursor"
.MC return
.CO "point to object-handle of the line"
.MC return 1
.DE
changes the line to bold dot-dashed.
.H 2 "View Commands"
All of the objects we have drawn lie within
a Cartesian plane, 65,534 units on each axis,  known as the
.I universe.
Thus far we have displayed only a small portion
of the universe on the display screen.
The command
.DS 1 1
.CN v iew \-u
.MC return
.DE
displays the entire universe.
.H 3 Windowing.
A mapping of a portion of the universe
onto the display screen is called a
.I window.
The extent or magnification of a window is
altered using the
.I zoom
command.
To build a window that includes all of the objects you have drawn type
.DS 1 1
.CN z oom
.MC return 1
.MC "position cursor"
.MC sp
.CO "above and to the left of any object"
.MC "position cursor"
.MC return
.CO "below and to the right, also end \fIpoints\fR"
.MC return
.CO verify
.DE
.sp
Zooming can be either \fIin\fR or \fIout\fR.
Zooming in, as with a camera lens,
increases the magnification of the window.
The area outlined by \fIpoints\fR is expanded
to fill the screen.
Zooming out decreases magnification.
The current window is shrunk so that it fits
within the defined-area.
The direction of the zoom is controlled by
the sense of the \fBo\fRut flag;
\fBo\fR true means zoom out.
.P
The location of a window is altered using
.I view.
.I View
moves the window so that a given point in the
universe lies at a given location on the screen.
.DS 1 1
.CN v iew
.MC return 1
.MC "position cursor"
.MC return
.CO "locate a point in the universe"
.MC "position cursor"
.MC return
.CO "locate a point on the screen"
.DE
.sp
.I View
also provides access to several predefined windows.
We have already seen
\fBv\fRiew \fB\-u\fR.
\fBv\fRiew \fB\-h\fR displays the
.I home-window
~  The home-window is the window that circumscribes
all of the objects in the universe.
The result is similar to that of the example using
.I zoom
given earlier.
.P
Lastly,
using
.I view
you may select to window on a particular
.I region.
The universe is partitioned into 25 equal sized regions.
Regions are numbered from 1 to 25 beginning at the
lower left and proceeding toward the upper right.
Region 13, the center of the universe,
is used as the default region by drawing commands
such as \fIplot\fR and \fIvtoc\fR (see [1]).
.H 2 "Other Commands"
.H 3 "Interacting with files."
To save the contents of the display buffer copy
it to a file using the \fIwrite\fR command:
.DS 1 1
.CN w rite
.I filename
.MC return 1
.DE
The contents of \fIfilename\fR will be a \s-1GPS\s+1,
thus it can be displayed using any of the device filters
(e.g., \fItd\fR [1]) or read back into \fIged\fR.
.P
A \s-1GPS\s+1 is read into the editor using the \fIread\fR command:
.DS 1 1
.CN r ead
.I filename
.MC return 1
.DE
The \s-1GPS\s+1 from \fIfilename\fR is appended
to the display buffer and then displayed.
Because \fIread\fR does not change the current
window only some or none of the objects read may be visible.
A useful command sequence to view everything read is
.DS 1 1
.CN r ead \-e\-
.I filename
.MC return 1
.CN v iew \-h
.MC return 1
.DE
The display function of \fIread\fR is inhibited
by setting the \fBe\fRcho flag to false.
\fBv\fRiew \fB\-h\fR windows on and displays
the full display buffer.
.P
The \fIread\fR command may also be used to input text files.
The form is:
.DS 1 1
\fBr\fRead [\fB\-\fIoption\fR(s)] \fIfilename\fR
.MC return 1
.DE
followed by a single point to locate the first line of text.
A text object is created for each line of text from \fIfilename\fR.
Options to \fIread\fR are the same as those for the \fIText\fR command.
.H 3 "Leaving the editor."
Use the \fIquit\fR command to terminate an editing session.
As with the text editor \fIed\fR,
\fIquit\fR responds with \fB?\fR if the internal buffer
has been modified since the last \fIwrite\fR.
A second \fIquit\fR forces exit.
.H 2 "Other Useful Things to Know."
.H 3 "One line UNIX escape."
As in \fIed\fR, \fB!\fR provides a temporary escape to the \fIShell\fR.
.H 3 "Typing ahead."
Most programs under UNIX allow you to type input before the program is ready
to receive it.
In general this is not the case with \fIged\fR\|;
characters typed before the appropriate prompt are lost.
.H 3 "Speeding things up."
Displaying the contents of the display buffer can be time consuming,
particularly if much text is involved.
The wise use of two flags to control what gets displayed
can make life more pleasant:
the \fBe\fRcho flag controls echoing of new additions to the display buffer;
the \fBt\fRext flag
controls whether text will be outlined or drawn.
.H 1 "COMMAND SUMMARY"
In the summary,
characters actually typed are printed in boldface.
Command stages are printed in italics.
Arguments surrounded by brackets are optional.
Parentheses surrounding arguments separated by ``or''
means that exactly one of the arguments must be given.
For example, the \fIDelete\fR command (Section 3.2) accepts the arguments
\fB\-u\fRniverse, \fB\-v\fRiew, and \fIpoints\fR.
.H 2 "Construct commands:"
.VL 17 5
.LI \fBA\fRrc
[\fB\-e\fRcho,\fBs\fRtyle,\fBw\fRidth] \fIpoints\fR
.LI \fBB\fRox
[\fB\-e\fRcho,\fBs\fRtyle,\fBw\fRidth] \fIpoints\fR
.LI \fBC\fRircle
[\fB\-e\fRcho,\fBs\fRtyle,\fBw\fRidth] \fIpoints\fR
.LI \fBH\fRardware
[\fB\-e\fRcho] \fItext points\fR
.LI \fBL\fRines
[\fB\-e\fRcho,\fBs\fRtyle,\fBw\fRidth] \fIpoints\fR
.LI \fBT\fRext
[\fB\-a\fRngle,\fBe\fRcho,\fBh\fReight,\fBm\fRidpoint,\fBr\fRightpoint,\fBt\fRext,\fBw\fRidth] \fItext points\fR
.LE
.H 2 "Edit commands:"
.VL 17 5
.LI \fBD\fRelete
( \fB\-\fR (\fBu\fRniverse or \fBv\fRiew) or \fIpoints\fR )
.LI \fBE\fRdit
[\fB\-a\fRngle,\fBe\fRcho,\fBh\fReight,\fBs\fRtyle,\fBw\fRidth] ( \fB\-\fR (\fBu\fRniverse or \fBv\fRiew) or \fIpoints\fR )
.LI \fBK\fRopy
[\fB\-e\fRcho,\fBp\fRoints,\fBx\fR] \fIpoints\fR \fIpivot\fR \fIdestination\fR
.LI \fBM\fRove
[\fB\-e\fRcho,\fBp\fRoints,\fBx\fR] \fIpoints\fR \fIpivot\fR \fIdestination\fR
.LI \fBR\fRotate
[\fB\-a\fRngle,\fBe\fRcho,\fBk\fRopy,\fBx\fR] \fIpoints\fR \fIpivot\fR \fIdestination\fR
.LI \fBS\fRcale
[\fB\-e\fRcho,\fBf\fRactor,\fBk\fRopy,\fBx\fR] \fIpoints\fR \fIpivot\fR \fIdestination\fR
.LE
.H 2 "View commands:"
.VL 17 5
.LI \fBc\fRoordinates
.I points
.LI \fBe\fRrase
.LI \fBn\fRew
.LI \fBo\fRbjects
( \fB\-\fR (\fBu\fRniverse or \fBv\fRiew) or \fIpoints\fR )
.LI \fBp\fRoints
( \fB\-\fR (\fBl\fRabelled-points or \fBu\fRniverse or \fBv\fRiew) or \fIpoints\fR )
.LI \fBv\fRiew
( \fB\-\fR (\fBh\fRome or \fBu\fRniverse or \fBr\fRegion) or [\fB\-x\fR] \fIpivot destination\fR )
.LI \fBx\fR
[\fB\-v\fRiew] \fIpoints\fR
.LI \fBz\fRoom
[\fB\-o\fRut]  \fIpoints\fR
.LE
.H 2 "Other commands:"
.VL 17 5
.LI \fBq\fRuit or \fBQ\fRuit
.LI \fBr\fRead
[\fB\-a\fRngle,\fBe\fRcho,\fBh\fReight,\fBm\fRidpoint,\fBr\fRightpoint,\fBt\fRext,\fBw\fRidth] \fIfilename\fR [\fIdestination\fR]
.LI \fBs\fRet
[\fB\-a\fRngle,\fBe\fRcho,\fBf\fRactor,\fBh\fReight,\fBk\fRopy,\fBm\fRidpoint,\fBp\fRoints,\fBr\fRightpoint,\fBs\fRtyle,\fBt\fRext,\fBw\fRidth,\fBx\fR]
.LI \fBw\fRrite
\fIfilename\fR
.LI \fB!\fR\fIcommand\fR
.LI \fB?\fR
.LE
.H 2 Options: 
\fIOptions\fR specify parameters used to construct, edit, and view graphical objects.
If a parameter used by 
a command is not specifed as an \fIoption\fR, 
the default value for the parameter
will be used.
The format of command \fIoptions\fR is
.DS 1 1
\fB\-\fR\fIoption\|\fR[,\fIoption\fR\|]
.DE
where \fIoption\fR is \fIkeyletter\fR[\fIvalue\fR].
Flags take on the \fIvalues\fR of true or false indicated by \fB+\fR and \fB\-\fR
respectively.
If no \fIvalue\fR is given with a flag, true is assumed.
.sp
Object options:
.VL 17 5
.LI \fBa\fRngle\fIn\fR
Specify an angle of \fIn\fR degrees.
.LI \fBe\fRcho
When true, changes to the display buffer will be echoed on the screen.
.LI \fBf\fRactor\fIn\fR
Specify a scale factor of \fIn\fR percent.
.LI \fBh\fReight\fIn\fR
Specify height of \fItext\fR to be \fIn\fR universe-units (0\^\(<=\^\fIn\fR\^<\^1280).
.LI \fBk\fRopy
The commands \fIScale\fR and \fIRotate\fR can be used
to either create new objects or to alter old ones.
When the \fBk\fRopy flag is true, new objects are created.
.LI \fBm\fRidpoint
When true, use the midpoint of a text string to locate the string.
.LI \fBo\fRut
When true, reduce magnification during \fIzoom\fR.
.LI \fBp\fRoints
When true, operate on points otherwise operate on objects.
.LI \fBr\fRightpoint
When true, use the rightmost point of a text string to locate the string.
.LI \fBs\fRtyle\fItype\fR
Specify line style to be one of following \fItypes\fR\^:
.br
	\fBso\fR	solid
.br
	\fBda\fR	dashed
.br
	\fBdd\fR	dot-dashed
.br
	\fBdo\fR	dotted
.br
	\fBld\fR	long-dashed
.br
.LI \fBt\fRext
Most text is drawn as a sequence of lines.
This can sometimes be painfully slow.
When the \fBt\fRext flag is false, \fItext\fR strings are outlined rather than drawn.
.LI \fBw\fRidth\fItype\fR
Specify line width to be one of following \fItypes\fR\^:
.br
	\fBn\fR	narrow
.br
	\fBm\fR	medium
.br
	\fBb\fR	bold
.LI \fBx\fR
One way to find the center of a rectangular area is to draw the diagonals of the rectangle.
When the \fBx\fR flag is true, defined-areas are drawn with their diagonals.
.LE
Area options:
.VL 17 5
.LI \fBh\fRome
Reference the home-window.
.LI \fBr\fRegion\fIn\fR
Reference region \fIn\fR.
.LI \fBu\fRniverse
Reference the universe-window.
.LI \fBv\fRiew
Reference those objects currently in view.
.LE
.H 1 ACKNOWLEDGEMENTS
\fIGed\fR borrows freely from the ideas and code
of the \fIgex\fR program by D. J. Jackowski.
The first version of \fIged\fR was written by D. E. Pinkston.
.H 1 "REFERENCES"
.RL
.LI
Feuer, A. R.;
"PWB/Graphics Overview";
TM 79-3782-1, June 11, 1979.
.LI
\fIPWB/UNIX User's Manual\fR \(EM Release 2.0, Bell Laboratories, 1979.
.LE
.SK
.nr Hu 1
.HU "APPENDIX:  SOME EXAMPLES OF WHAT CAN BE DONE"
.sp 
.nr Hu 2
.HU "1.  Text Centered Within a Circle"
.DS 1 1
.CN C ircle
.MC cr 1
.MC "position cursor"
.MC sp
.CO "establish center"
.MC "position cursor"
.MC cr
.CO "establish radius"
.CN T ext \-m
.MC cr
.CO "text is to be centered"
.B "some text"
.MC cr 1
.B "$.0"
.MC cr
.CO "first point from previous set, i.e., circle center"
.MC cr
.DE
.SK
.HU "2.  Making Notes on a Plot"
.DS 1 1
.CN ! "" "gas | plot \-g >A"
.MC cr
.CO "generate a plot, put it in file A"
.sp
.CN r ead "\-e\- A"
.MC cr
.CO "input the plot, but do not display it"
.CN v iew \-h
.MC cr
.CO "window on the plot"
.CN L ines \-sdo
.MC cr
.CO "draw dotted lines"
.MC "position cursor"
.MC sp 1
.MC "position cursor"
.MC sp 1
.MC "position cursor"
.MC sp 1
.MC cr
.CO "end of Lines"
.CN s et \-h150,wn
.MC cr
.CO "set text height to 150, line width to narrow"
.CN T ext \-r
.MC cr
.CO "right justify text"
.B "threshold beyond which nothing matters"
.MC cr 1
.MC "position cursor"
.MC cr
.CO "set right point of text"
.CN T ext \-a\-90
.MC cr
.CO "rotate text negative 90 degrees"
.B "threshold beyond which nothing matters"
.MC cr 1
.MC "position cursor"
.MC cr
.CO "set top end of text"
.CN x
.MC cr
.CO "find center of plot"
.MC "position cursor"
.MC sp
.CO "top left of plot"
.MC "position cursor"
.MC cr
.CO "bottom right"
.CN T ext \-h300,wm,m
.MC cr
.CO "build title: height 300, weight medium, centered"
.B "SOME KIND OF PLOT"
.MC cr 1
.MC "position cursor"
.MC cr
.CO "set title centered above plot"
.DE
.SK
.HU "3.  A Page Layout with Drawings and Text"
.DS 1 1
.tr Q"
.CN ! "" "rand \-s1,n100 | title \-vQseed 1Q | qsort | bucket | hist \-r12 >A"
.MC cr 1
	(put a histogram, region 12, of 100 random numbers into file A)
.CN ! "" "rand \-s2,n100 | title \-vQseed 2Q | qsort | bucket | hist \-r13 >B"
.MC cr 1
	(put another histogram, region 13, into file B)
.CN ! "" ed
.MC cr
.CO "create a file of text using the text editor"
.B "a"
.MC cr 1
.B "On this page are two histograms"
.MC cr 1
.B "from a series of 40"
.MC cr 1
.B "designed to illustrate the weakness"
.MC cr 1
.B "of multiplicative congruential random number generators."
.MC cr 1
.B "~pl \en(nlu"
.MC cr
.CO "mark end of page"
.B "."
.MC cr 1
.B "w C"
.MC cr
.CO "put the text into file C"
156
.br
.B q
.MC cr 1
.CN ! "" "nroff C | yoo C"
.MC cr
.CO "format C, leave the output in C"
.sp
.CN v iew \-u
.MC cr
.CO "window on the universe"
.CN r ead A
.MC cr 1
.CN r ead B
.MC cr 1
.CN r ead "\-h300,wn,m C"
.MC cr
.CO "text height 300, line weight narrow, text centered"
.MC "position cursor"
.MC cr
.CO "center text over two plots"
.CN v iew \-h
.MC cr
.CO "window on the resultant drawing"
.DE
.SK
.sp 9i
.I "January 1980"
.CS 13 4 17 10 0 2