home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 18
/
CD_ASCQ_18_111294_W.iso
/
dos
/
graphic
/
pep16
/
chapt16.txt
< prev
next >
Wrap
Text File
|
1994-10-19
|
22KB
|
419 lines
<Chapter 16: Hints, Tricks and Warnings>
In designing PEP, we have put a great deal of emphasis on
flexibility. We have tried as much as possible to divide PEP's
functionality into elementary features that you can control independently
and combine to accomplish a wide variety of drawing goals. We have tried
not to prejudge what your drawing tasks might be, or limit how you might
combine PEP's features to accomplish them.
But this flexibility carries a cost with it. Sometimes, to accomplish
a simple thing it is necessary to change several settings, and the best
approach to a given problem is often not obvious at first. In the
preceding chapters, we have discussed, one by one, the individual
functions that PEP offers. Here we give a few examples of how to use these
features, especially in combination, to solve particular problems.
<Section 16.1: How to Center Text>
In PEP, centered text is positioned between the left edge (L) and the
right edge (R) of the text label box. If you want to produce centered
text, first determine the coordinates L and R that you want to center the
text between. Insert the text label at the left edge coordinate L. Then,
in the MODIFY menu, change the following three properties of the text
label. Use the JUSTIFY command <[4.13]> to set the justification to
CENTER. Use the BOX command <[4.15]> to set the box mode to FIXED.
Finally, use the WIDTH command <[4.16]> set the box width to (R - L), the
distance between the left and right edges that you have chosen. <[FIG11]>.
If you are inserting several centered labels, you may want to start
by setting the justification, box mode, and width in the G-DEFAULTS menu
<[10]>. Then you do not to have to modify each text label individually.
The use of the words "left" and "right" above assumes that the text is not
rotated, but the same principles apply to centering text in any rotation.
<Section 16.2: How to Copy from One Object to Another>
Copying material within an object is easy: just use MODIFY/DUPLICATE
<[4.2]>. If you are copying several elements, you may want to first use
the COLLECT menu <[5]> to group the elements together, rather than copying
each element individually.
To copy material from one object to another, you need to know a
trick. If you want to copy from object A to object B, first use
OBJECT/OPEN <[7.1]> to display object A. Then delete the material you want
to copy. (If you are copying many elements, you may want to use
COLLECT/DELETE <[5.9]> to do this.) Next, open object B for editing,
without closing object A. Use UN-DELETE <[3.1]> to insert the deleted
material into object B. Because you did not save your changes to object A,
this material is now present in both objects. The un-deleted material
occupies the same position in object B that it occupies in object A. Use
MODIFY/MOVE <[4.1]> if you need to reposition it.
If objects A and B are not in the same file, proceed as follows.
First, use FILE/LOAD <[8.2]> to load the file containing object B. Then
use OBJECT/IMPORT <[7.8]> to copy object A into that file. Now that both
objects are in the loaded file, you can use the trick described above to
copy the material from A into B. Finally, use OBJECT/ELIMINATE <[7.6]> to
remove, from the loaded file, the definition of object A, which you no
longer need.
<Section 16.3: Keeping Notes>
Sometimes you will make changes to your standard configuration of PEP
when you are creating a picture. For example, you may install a different
collection of fonts, or a different pattern file, or you may change the
printer rotation to print sideways (landscape) rather than right side up
(portrait). You will probably want to remember these changes in case you
need to edit or print that picture again. The easiest way to do this is to
create a separate object in that file, giving it the name NOTES. You can
then type into that object, as text labels, all the relevant PEP settings,
and any other information that you think you might need later when editing
or printing the pictures in that file.
<Section 16.4: Hidden Object Names>
A complex PDL file may contain a large number of different objects.
It will often happen, however, that many objects in a file are seldom
directly referred to. Once created, they are not re-edited, and they
appear only as components of other objects. It is therefore convenient to
split the menu of all object names into two parts, those objects
frequently used, and the ones that are seldom referred to. You can
accomplish this by using hidden object names.
If you give an object a name beginning with the tilde character (~),
that object becomes hidden. It does not appear directly in the menu of
object names. Rather, that menu contains a single entry, ~HIDDEN, that
represents all of the hidden objects. If you select this menu item, a
second menu appears containing the names of just the hidden objects. In
this way, you can select a hidden object if you wish, but the hidden names
will not appear unless specifically requested.
To hide an object name, add the tilde character to the start of the
name using either OBJECT/CLOSE <[7.2]> or OBJECT/RENAME <[7.3]>. To
un-hide the object, remove the tilde with OBJECT/RENAME.
<Section 16.5: Default Object Definitions>
When PEP is first loaded, and whenever the FILE/NEW command is
executed, PEP creates a new PDL file in memory. The new PDL data contains
certain default object definitions. These defaults are obtained from the
file AUTO.SAM. The version of AUTO.SAM supplied with PEP contains two
objects, CIRCLE and BOX. If there are objects you use repeatedly, you may
want to add them to the defaults. AUTO.SAM is an ordinary PDL file; you
can modify its contents by editing with PEP. Use the FILE/EXTENSIONS menu
<[8.5]> to change the LOAD and SAVE extensions to SAM. Edit AUTO.SAM as
you would any PDL file. After saving your changes to disk, use
QUIT/RESTART <[9.4]> to restart PEP with the new default definitions
installed.
<Section 16.6: Navigating Tricks>
If you are editing a large object and need to move the active
graphics window from place to place in that object as you edit, you can
accomplish this by simply using the shift NumPad keys. However, there are
other techniques that are often more convenient.
If you have another graphics window in total page mode, you can
position the active window using this second window for reference.
Position the cursor at a selected point in the total window, and use ALT-L
<[14.3.10]> or ALT-U <[14.3.17]> to move the active window display. The
result is that the center (or upper left corner) of the window is
positioned at the selected point.
Alternatively, you can temporarily set the active window to total
page mode (ALT-T ALT-T <[14.3.16]> will do this), select a point in the
active window, and use ALT-L or ALT-U as above to position the window at
that point. The former window stretch values (temporarily overridden when
you set total page mode) are restored to their correct values by these
window positioning commands.
If you are editing at one point in the object, and for accuracy you
want to expand the magnification (ALT-E <[14.3.4]>) or go into fatdots
mode (ALT-F <[14.3.5]>), by doing so you may move the relevant point out
of the active window. To prevent this, begin by setting the jump location
at that point via the ALT-J command <[14.3.9]>, then use ALT-E or ALT-F as
required, and finally use ALT-M <[14.3.11]> to move the active window so
that the selected point is once again on view.
<Section 16.7: How to Edit a Font File>
It is possible in PEP to add new characters to a font and to edit the
shapes of existing characters. A font file is essentially a PDL file like
any other, except that the objects in the file (that is, the characters)
do not have object names. Normally, the absence of object names would make
it impossible to open and close the objects in this file, but PEP provides
a trick to overcome this difficulty.
To edit a font, first use FILE/EXTENSIONS/LOAD <[8.5.1]> and
FILE/EXTENSIONS/SAVE <[8.5.2]> to change the extensions used when loading
and saving picture files. Change both extensions from PDL to FON. Then use
FILE/LOAD <[8.2]> to load the font file that you want to edit. Whenever
the loaded picture file has the extension FON, the behavior of OBJECT/OPEN
<[7.1]> and OBJECT/CLOSE <[7.2]> is changed. To open an object in a FON
file, instead of specifying an object name, you either type in its
numerical ASCII code or type a single or double quote followed by the
character that you want to open. To open the upper case A character, for
example, you could type any one of the following. (65 is the ASCII code
for upper case A.)
65
'A
"A
These will open the upper case A from subset 0 of the font, the
subset containing the normal style characters. To open a character from a
different style subset, you can add 128 times the subset number to the
ASCII code, or precede the character by the subset number and a colon. To
open a bold italic lower case b, for example, any of the following will
work (98 is the ASCII code for lower case b and subset 3 contains the bold
italic characters):
482
3:98
3:'b
3:"b
The same formulas apply when using OBJECT/CLOSE to close a new or
modified character.
If you are creating new symbols for a font, instead of replacing
existing characters you might prefer to add the new symbols to an unused
font subset. The BEAMOF font contains only normal style characters (subset
0); new symbols added to it could be placed in the italic set (subset 1),
for example. Before creating a new symbol, you should first examine an
existing character to determine the base line coordinate, the line styles
used, and so forth. You will probably want your new symbols to be
compatible with these values.
When you have finished making all your changes to the font file, use
FILE/SAVE to save it back to disk. Then use FILE/EXTENSIONS/LOAD and
FILE/EXTENSIONS/SAVE once more to set the picture file extensions back to
PDL.
You are now ready to use the font that you have just edited. After
saving the font file, you can use the SETUP/INSTALL menu <[12.5]> to
install that font into PEP. If you changed a font that was already
installed, you must nevertheless re-install the font after saving the
changed font file to disk. Then the changed version will be available for
you to use.
The fonts supplied with PEP contain some extra information that is
used when scaling characters to maintain the symmetries in certain
characters, to preserve equal stroke weight and equal serif length across
the entire font, and to improve the appearance of the characters in a
variety of ways. This extra information cannot be edited graphically. If
you add new characters to a font this extra information will be preserved.
If you modify the contents of a character, however, this information may
be lost. We recommend that you not modify the contents of the characters
in the PEP fonts, but if you do, be sure to keep a backup copy of the
original font.
There are some restrictions that you should know on the kinds of
elements that can appear in the character objects that make up a font. You
should not use colors (other than FOREGROUND) in drawing a character. When
PEP uses that character in a text label all color information is ignored.
You should also not use pattern fills in a character, although solid
filled regions are legal. Most importantly, you should never include a
text label within a character. It is illegal for a character in a font to
contain text labels among its elements. If you insert text into a
character while you are editing a font file, it may cause a fatal error
later when you try to install or use that font.
<Section 16.8: Printing an Old Picture on a New Printer>
PEP pictures are device independent. You can print them at any size
and in any proportions on any supported output device. So if you have
created a picture to print on printer A, and now you want to print it on
printer B and produce a picture of the same size and proportions, that
must be possible. But how exactly do you do it?
One approach is physically to measure the output from printer A and
use the PRINT/IMAGE command <[6.9]>. This is a nuisance if you have many
pictures to print. Here is an easier way which is also more accurate.
First you have to know the printer resolutions. You can find the
resolution of your installed printer by using the SETUP/NUMBERS/INCH
command <[12.4.5]>. Say for example, that printer A is a 300 dot per inch
LaserJet and printer B is an Epson FX80 in HI-RES mode. The Epson
resolutions are 120 dots per inch horizontally and 144 vertically. Set the
printer stretches to 120/300 in the X direction and 144/300 in the Y
direction. See <[FIG15]>. In other words, the stretches are the new
printer resolution divided by the old printer resolution. Now any object
printed on printer B will have the same overall size as if it had been
printed on printer A with unity stretches.
Note: if you were printing in a landscape orientation, for example 90
degree rotation, you would set X to 144/300 and Y to 120/300.
<Section 16.9: Creating a Slide Show>
You can use PEP's configuration file capability to create slide
shows. Configuration files are just recorded sequences of keystrokes. When
PEP is first loaded (or is restarted) it executes the commands in its
configuration file just as if they had been typed in from the keyboard.
Thus anything you can do in PEP can be included in a slide show, but
everything must be done from the keyboard; mouse motions are not recorded
in configuration files.
To create a slide, first use QUIT/MAKEFIG <[9.3]> to start the
creation of a configuration file. Then execute any set of PEP commands to
produce the screen image you want to use for your 1st slide. Then press
ALT-H <[14.3.7]>. Next execute more commands to produce the 2nd slide and
press ALT-H again. Repeat this process once for each slide, and finally
press ALT-Z <[14.3.20]> to save the slide show file to disk.
The ALT-H commands insert pause instructions into the configuration
file. These are needed because keystrokes are read out of the slide show
file much faster than they were typed in. It is the pause instruction
which stops PEP execution long enough for the slide to become visible.
Typing any key will end a pause.
To run a slide show, use the /F and /P command line options when you
load PEP. The /F option identifies the configuration file to use and the
/P option specifies the length (in seconds) of the pause whenever an ALT-H
is encountered in the file. If the /P option is omitted, then PEP will
wait after each slide until the user presses a key on the keyboard. To
omit the initial PEP greeting screen, add the /N option to the command
line. For example, the command line:
PEP /F=SHOW /P=2 /N
loads PEP without the initial greeting screen, executes the configuration
file SHOW.FIG, and pauses for 2 seconds whenever an ALT-H is encountered
in that file.
One simple way to construct a slide show is to draw the slides as a
sequence of objects in a PDL file. Then create a slide show configuration
file that loads that PDL file and opens each object in succession with a
pause after each.
You can make a slide show that will repeat indefinitely by ending
your configuration file with the QUIT/RESTART command <[9.4]> and
selecting the new configuration file as the one to restart with.
Configuration files contain only the standard printing ASCII
characters, so that if you want to make small changes to a slide show, you
may be able to do this more easily with a text editor than by re-creating
the file in PEP. Certain keys are represented by a sequence of three
characters, an underscore, and two others. Thus pressing the up-arrow
while creating a configuration file inserts the three characters "_up"
into the file. Pressing F1 inserts "_f1". Below is the complete list of
the underscore sequences that may appear.
_bs = backspace
_bt = tab
_ff = form feed
_es = escape
_us = underscore
_up = cursor up
_dn = cursor down
_lf = cursor left
_rt = cursor right
_hm = cursor up left (home key)
_en = cursor down left (end key)
_pu = cursor up right (pgup key)
_pd = cursor down right (pgdn key)
_g+ = auto-motion (grey +)
_g- = step size toggle (grey -)
_g* = stretch cursor corner (grey *)
_cl = word left (control left arrow)
_cr = word right (control right arrow)
_bk = break
_tb = backtab
_in = insert
_de = delete
_f1 = function key F1
_f2 = function key F2 etc.
_fa = function key F10
_x1 = ALT+function key F1
_x2 = ALT+function key F2 etc.
_aa = ALT+letter A
_ab = ALT+letter B etc.
_wu = window up (shift up)
_wd = window down (shift down)
_wl = window left (shift left)
_wr = window right (shift right)
_wh = window up left (shift home)
_we = window down left (shift end)
_w9 = window up right (shift pgup)
_w3 = window down right (shift pgdn)
<Section 16.10: Postscript Output>
Most printers supported by PEP are bitmap devices. Each pixel printed
is individually specified by PEP. Postscript printers are the exception to
this rule. With Postscript, you have two options. When you install PEP,
you can elect to use your Postscript printer as a bitmap device like any
other printer, or you can choose to communicate with it at a higher level
via the Postscript language <[17.2]>.
The advantages of choosing the Postscript language option are that
printing is normally faster in this case, color output is supported, and
you have access to the standard Postscript fonts. There are additional
advantages if you plan to output pictures to files in the encapsulated
Postscript (EPS) format. Using EPS files you can incorporate pictures
drawn in PEP into documents created by many word processors and page
layout programs. These EPS files will typically be shorter if the higher
level option has been selected, the picture will scale more smoothly when
it is combined with other material in a document, and you can include
device independent screen preview information (see below). You can enable
encapsulated Postscript output by using the PRINT/DEVICE/OUTPUT command.
However, if you output via Postscript, there will be some differences
between the screen display of a picture and its appearance when printed.
There are certain limitations in the translation from PEP's internal PDL
representation into the Postscript language, and you should be aware of
these.
The following discussion assumes that you have selected the
Output-Postscript option when you installed PEP. If you chose the
Output-Bitmap-Graphics option, the remainder of this section does not
apply.
Each PEP font number is assigned to a distinct Postscript font. This
assignment is fixed and independent of the PEP font also assigned to that
number. Using the SETUP/INSTALL/FONT commands <[12.5.1]> will not effect
the fonts used when printing to Postscript. The table below lists the PEP
font numbers to be used when accessing the various Postscript fonts.
Font 0 Times
Font 1 Helvetica
Font 2 ZapfChancery
Font 3 Bookman
Font 4 Palatino
Font 5 AvantGarde
PEP will adjust the character spacing of these fonts to guarantee
that each text label retains its correct label width when printed in
Postscript. To override this correction and employ the native font metrics
of the Postscript fonts, use the PRINT/DEVICE/TEXT-MODE command.
Postscript pattern fill is accomplished by using halftone screens.
Each PEP pattern number corresponds to a unique combination of size and
spacing parameters for the halftone dots. Using the SETUP/INSTALL/PATTERNS
<[12.5.2]> command does not change the Postscript pattern produced by a
given PEP pattern number. Since halftone screens are implicitly used when
producing colored images, patterns are suppressed by PEP if a filled
region has a color other than black. You can avoid this elimination of
patterns by using the PRINT/DEVICE/BLACK-ONLY command to disable colors in
the Postscript output.
Finally, the Postscript language does not support the range of
nibtypes that can be used when drawing lines in PEP. We recommend that,
for Postscript output, you use only the point and ellipse nibs. Note that
the graphics libraries supplied with PEP often employ nibtypes not
supported by Postscript. In some cases, objects from these files will not
be faithfully reproduced when translated into Postscript.
If you are printing an object that contains colors and you have a
black and white Postscript printer, the different colors will be rendered
as various shades of gray. If you want to avoid gray levels and print
everything in uniform black, use the PRINT/DEVICE/BLACK-ONLY command.
You can include device independent (EPSI) screen preview data in EPS
files produced by PEP. Use the PRINT/DEVICE/PREVIEW command to enable the
inclusion of EPSI bitmap data. Applications that support EPSI preview will
then be able to display a representation of the EPS file image on screen
for easier manipulation. EPSI data is stored as ASCII text comment fields
in the EPS file and will be ignored by any application not supporting EPSI
previews.
The inclusion of preview data will substantially increase the size of
an EPS file, and there is a trade-off between the accuracy of the preview
image and the amount of extra file storage required. You can control the
increase in file size by using the PRINT/DEVICE/LIMIT-SIZE command to
specify a maximum amount of preview data to add to each file. Press the
command letter and enter the preview limit size in kilobytes. Larger
amounts result in finer resolutions. This command has no effect unless
EPSI preview output is enabled.