home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
gamegif
/
pckeydrw.lzh
/
KD_DOC.5_9
< prev
next >
Wrap
Text File
|
1988-06-23
|
60KB
|
2,707 lines
──────────────────────────────────────────
5 - DRAWING EXAMPLES
──────────────────────────────────────────
Start out using the program by experiment-
ing. Try using the various functions and
actions and noting the results. With a
little time and practice, using the pro-
gram becomes very fast and efficient. For
major works, take time to plan out the
order in which you will create the draw-
ing. It is generally best to start with
the details, shrink these down and combine
them to produce the final drawing.
If you want the printed drawing to look
like the screen, the reverse video action
should be chosen from <F1> just before
printing. This is useful for showing
things like planetoids, paintings, etc,
because the black background is more natu-
ral. Mechanical drawings should be printed
out without reversing the screen so that
they correspond to the standard method of
viewing, black print on white.
[GIRLNC] [GIRLRC]
Figure 5-1 shows GIRL.SCN in normal and
reverse video. In this case the reverse
video should be used before printing for
the best results.
DRAWING EXAMPLES 5-1
Since many of the actions take place
inside of boxed areas it is advisable to
create parts of a drawing separately and
then combine them at the end. This can be
accomplished by drawing the various compo-
nents on different parts of the screen or
by using a screen for each component and
combining screens using the copy action of
<F7>. Alternately, layers can be used to
keep portions of the drawing separate.
The following contains a number of simple
examples to help get you started. The
examples are written out in long form.
Elsewhere in this manual the examples are
provided in a MaCRo file form.
To draw box: Move the cursor to one of the
corners of the box. Select desired color
of box with <F10>. Select <F2> and
<r>ectangle to display the box as it is
drawn. Move the cursor to form the box as
desired. Use the <Shft-Cursor> keys to
adjust the start point of the box if
needed. Hit either <F2>, <ENTER>, or
<F1-F8> to complete function and draw box.
Respond <y> to the "Correct (y/n)?" prompt
to keep the box or <n> to return to the
drawing as it was.
To draw a circle: Move the cursor to the
desired center of the circle. Select
desired color of the circle with F8.
Select <F3> and <c> for circle. Move the
cursor to the desired radius and hit
either <F3>, <ENTER>, or <F1-F8> to
complete function and draw circle. If the
circle is not properly centered simply
hold down the <Shift> key while using the
cursor keys. Respond as desired to the
"Correct (y/n)?" prompt.
DRAWING EXAMPLES 5-2
To draw a line: Move the cursor to the
start of the line. Select <F6> and <l>.
Move cursor to position line as desired.
Use a <ENTER> or <F1-F8> <l> to mark next
point on line. Continue drawing lines. To
stop momentarily use the <Space Bar>. If
you make an error, <Back Space> can be use
to erase the last line and redraw up to
where you are. Line width can also be set
using the <w>idth command of the CURSOR
MODE and changed at will while drawing the
line. The color can be varied as the line
is drawn and you can switch back and forth
with <d>ot, <p>arallel line, and <s>poked
line. When last point of line has been
marked, select <F6> and either <e> or <E>
to end the line. If <E> is chosen the line
is not only drawn on the screen, but saved
to disk under user specified name. It can
be retrieved at any angle and any scale
using <F6 o>. Even if you did not save the
drawing to disk, it is still available for
reuse, continuation or modification.
Select <F6 O> to redraw the last vector.
Built in Objects: PC-KEY-DRAW contains a
number of objects built into the program.
Figure 5-2 shows a number of the built in
objects, including rectangle, circle and
line. The objects can be combined to
create more complex images or modified
with the commands like <F1 Ctrl-s>lide,
<m>irror, <f>lip and more. Objects can be
created with <F6 l> and stored as vector
images to disk.
DRAWING EXAMPLES 5-3
[primitiv]
Figure 5-2. Object primitives; from <F2>
<r>-rectangle, <p 3>-polygon with 3 sides
(triangle), <p 4>-polygon with 4 sides
(square), <p 5>-polygon with 5 sides (pen-
tagon), <p 6>-polygon with 6 sides (hexa-
gon), and <p 7>-polygon with 7 sides (hep-
tagon); from <F3> <c>-circle, <e>-ellipse,
<a>-arc, <A>-pie shape arc, <r>-rose
curve, <t>-trig (sine curve), <s>-spiral,
and <b>-b-spline curve; and from <F6>
<l>-line and <s>-spoke. Figure 5-2 was
created in the high resolution mode. The
prompt line shows that "parallel line" is
about to be selected.
To erase an area: Move the cursor to a
position at one of the corners of the area
to be erased. Select <F7 e> to mark the
corner. Move the cursor to enclose the
desired area with the display box. As with
box the <Shft-cursor> keys can be used to
modify the initial corner position. Select
<ENTER> or <F1-F8> to mark the opposite
corner. Copy works the same way.
DRAWING EXAMPLES 5-4
[planet]
Creating 3-D looking
spheres or planetoids is
easy using the spray
paint feature of <F4>.
Start by drawing a circle
of desired size, next
paint it with <F5> as
desired. Move the cursor
to a location on the now
painted circle and select
<F4 s> to spray paint one of the colors in
the circle or if you prefer use <F4 Alt-s>
to spray paint all foreground colors.
Next move the cursor to one corner of the
square containing the circle and select
<ENTER> to mark that corner. Next enclose
the circle in a box by moving the cursor
and select <ENTER> a third time to begin
spray painting. Figure 5-3 shows what a
simple planetoid might look like. This is
a fun operation to use with the key macro,
since by varying the cursor speed before
calling the macro a different size plane-
toid will result.
Very complex and interesting patterns can
be created by copying and area and then
moving off the screen with <F7 a>nimate.
Try this with the file KD-PTRN.PIC, which
can be retrieved with <F7 o>ld. When you
obtain a particular pattern you want to
use leave it on the screen with <F7 M> and
then copy it again. Next move over the
object you wish to paint with this new
color pattern. Select <F7 Ctrl-m> to paint
the object. (Note the object should be in
color 3 for best results.)
DRAWING EXAMPLES 5-5
[3dbox]
3-D oblique drawings can
be made quickly from 2-D
drawings. In high resolu-
tion, draw a box with <F2
r>; copy the box with <F7
c>; set the cursor speed
to 1; move one space to
the left and one space
up; select <F7 s>; move
alternately one step left
and one step up until cube is of desired
size; select <F7 M>; and the cube is com-
plete. Figure 5-4 shows just such a cube.
Schematics and flow charts can be readily
created from predefined symbol libraries.
Creating your own symbol libraries is easy
and straight forward. For objects that you
want to bring in at different sizes and
angles the features of <F6> are ideal. As
an illustration, lets consider creating
symbols of furniture to use in laying out
an office. Start by setting the scale of
the screen so that the furniture will
nearly fill the screen when drawn to get
the maximum resolution. Move to 0,0 with
<Alt-1>, select <F6 l, d, p, s> to start
drawing the item. When you have completed
drawing the item select <F6 E> to end line
drawing save the vector image to disk.
Give the item an appropriate name and go
to the next item. When you are working on
the room layout simply call up the
required object from disk using <F6 o>,
rotate it if desired, and place it where
you want. See Figures 5-5 and 5-6 for a
sample hydraulic schematic.
DRAWING EXAMPLES 5-6
[hydro]
Figure 5-5 Schematic Sample
[fluid2]
Figure 5-6 Schematic Sample
Special effects can be created by setting
the background attribute to something
other then the actual background. Try
setting the background with <B> to <1>.
Now draw a box or circle or line. Note how
the object is left behind as you move the
DRAWING EXAMPLES 5-7
cursor. When you hit the <ENTER> key the
screen is refreshed and then the final
box/circle/line is drawn, but sometimes
it is desirable to use <B> to create pat-
terns and other effects much quicker than
otherwise possible. At any time you wish
to preserve what the screen shows, select
<k>eep and it will be saved.
16 Colors: If you have a composite color
monitor or TV set you can obtain sixteen
colors instead of the normal 4 available
in RGB. Set the color palette to the sec-
ond palette where color 1=Green, color
2=Red and color 3=Yellow. Draw several
boxes, circles, or polygons on the screen.
Move the cursor to within one of the fig-
ures and select <F5 Alt-p>aint. A color
bar will appear showing 16 color choice,
but these won't look that great. Select a
</> and the colors change to 16 distinct,
vibrant colors on a composite monitor.
Select the number you desire and specify
the color of the figure and the object is
painted. Most of the other drawing func-
tions only recognize the four primary col-
ors so some care must be taken when creat-
ing a composite picture.
Macros included with PC-KEY-DRAW can be an
ideal method of learning how to use the
program. By watching the macros you can
get a feel for what can be done. By read-
ing the macro files you can learn the
exact key strokes required to create a
given effect. See the following section on
editing macros for more information. Try
entering the key strokes as they are and
see what happens. Note that some macros
start with a lot of initialization, while
others get right down to drawing.
DRAWING EXAMPLES 5-8
Several things can be done to slow macros
down so that what is happening is more
visible. Try turning on the Help menu by
setting the program to Novice mode in the
<Ctrl-s>tatus Screen. Remove the *|2 or
*|1 line in the macro so that the cursor
and prompt are shown when the macro is
run. This makes it run a lot slower. You
can even add <Alt-p>ause commands at vari-
ous places in a macro so that it stops for
awhile before proceeding.
DRAWING EXAMPLES 5-9
──────────────────────────────────────────
6 - KEY MACRO
──────────────────────────────────────────
Perhaps one of the most powerful functions
of PC-KEY-DRAW is the key macro command,
because it has so many different uses. I
have yet to fully explore all of the uses
of the key macro, but they include saving
entire drawings, creating slide shows,
saving commonly used routines/figures, and
performing repetitive operations. The key
macro command works by recording all of
the key strokes you make and saving them
to disk in a sequential ASCII file. The
program keeps track of the same key being
hit a multiple number of times and records
not only the key, but its repetition num-
ber. Key macro files can be very small
and still do quite a lot.
Saving Entire Drawings: PC-KEY-DRAW pro-
vides numerous ways to save a drawing,
which way you use depends on a variety of
factors. The key macro offers a way to
save a drawing that is rather different
from the rest, because, instead of saving
a completed drawing, you are saving the
steps to create that drawing. When the key
macro is used to save a drawing it should
start by properly initializing the pro-
gram, so that each time it is called the
result will be the same. After selecting
create macro with <Alt-k c> and naming it,
initialize the program. Initialization
should start with refreshing the screen
with <F8 f>, setting the cursor to 0,0
with <Alt-1>, setting the cursor speed to
one with <Shft-F9>, and setting the color
to 1 with <Shft-F10>. Then proceed to
create the drawing. When the drawing is
KEY MACRO 6-1
complete, end the key macro with <Alt-k
e>. The drawing can then be redrawn with
<Alt-k r> and the macro name. IRIS2.MCR
(on Library Disk #2) is an excellent
example of saving an entire drawing.
IRIS2.MCR must be drawn from the medium
resolution mode and started with both
SCreen 1 and SCreen 2 clear.
Slide Shows: Very interesting slide shows
can be created quickly and easily using
the key macro command. The complete draw-
ing capability is available to be used in
the slide show. Slide shows are created
simply by starting the macro and then per-
forming the desired steps. This might be
as simple as calling up a series of
already completed drawings and pausing in
between them or may include the actual
creation of the drawing as part of the
show. The DEMO.BAT (formally SAMPLE) macro
included on the program diskette was
created simply by drawing what was wanted.
As with the saving of a drawing, slide
shows should be initialized for best
results. Portions of a slide show can be
done separately and then combined by link-
ing or merging. Linking is performed by
calling the next sequence from the end of
the first. In this way slide shows can be
very long or continuous. Merging is accom-
plished using a word processor and actu-
ally combining files. See Editing Macros
for more information.
KEY MACRO 6-2
The <*> (star) command is useful for slide
shows and you may want to include it as
part of the initialization. Normally the
prompts for the program will be displayed
as a macro is run, but by using a single
<*> at the beginning of the command all
printed prompts can be suppressed. This
not only improves the appearance of the
slide show, but it greatly speeds the
execution time. Entering <*> twice will
stop printing of prompts and will hide the
cursor. From a text editor put the follow-
ing line in to stop the prompts:
*|1
or use the following to stop the prompts
and hide the cursor:
*|2
or to hide the prompts, cursor, object
capture lines, and most cursor related
actions, such as circle, arc, and rectan-
gle rubberbanding until sizing is complete
use:
*|3
or to hide the prompts, cursor, object
capture lines, and all cursor line rubber-
banding use:
*|4
Future versions may use higher valves of
<*> for various special effects.
KEY MACRO 6-3
Star commands take effect immediately and
absolutely. Generally the first line of a
macro is a star command. A star command,
once started, remains in effect until the
macro ends or until another star command
takes effect. Star commands are provided
as a means to speed up macro execution and
hide some of the behind scenes action from
the viewer. To display all activity during
a macro use:
*|0
Note that with *|3 and *|4 some special
effects are lost, in particular those that
use <B>ackground to leave behind color as
the cursor is moved will not behave the
same if the cursor drawing is turned off.
Saving Commonly Used Routines/Figures:
Certain operations can be saved for later
use in another drawing. These saved oper-
ations can be called from disk as needed
to perform the required task, and save
having to manually do the task. Generally,
routines should include minimal initial-
ization for the maximum flexibility. Vari-
ous figures that are commonly used can
also be saved with the key macro command,
as they will probably require less disk
space then if saved with one of the other
methods. The penalty for doing so is the
time required to create the figure on the
screen will be longer than that required
to simply call the completed drawing from
disk. However, for saving border patterns
and the like, the key macro command is
ideal.
KEY MACRO 6-4
Repetitive Operations: Key macros can be
used to automate certain repetitive
actions and save you significant time. An
example of such is the creating of concen-
tric circles or ellipses using all of the
available colors. Try the following:
1. Locate the cursor in the screen center.
2. Set the cursor speed to 1 and the color
to one.
3. Start the key macro with the name
CIRCLE.
4. Draw a circle of radius one pixel.
5. End the circle and confirm that it is
correct.
6. Move the cursor to the center of the
circle using <C>.
7. Step the cursor speed up one using the
<+> key.
8. Step the color up one using the <F10>
key.
9. Select <Alt-k> and run the macro CIRCLE
from itself.
At this point the program should start
drawing circle after circle, each time
incrementing the color and the size by
one. To stop the macro use <Esc>. Try some
other short drawings and linking them to
themselves.
Configuration: While PC-KEY-DRAW provides
a Configuration Screen, it does not remem-
ber everything that you may want it to
remember the next time you run the pro-
gram. A simple solution is to create a key
macro that does the desired configuration,
such as adjusting the screen. Version 3.1
or later allow macros to be called from
DOS when the program is called, by simply
entering the name of the macro on the com-
mand line after the program name, followed
by a space.
KEY MACRO 6-5
Editing Macros: The editing of macros
created from version 3 is limited to using
a word processor. The file is straight
ASCII, but beware that what may look like
a common space CHR$(32) is actually an
ASCII zero CHR$(0). Also beware that cur-
sor position is relative, not absolute.
The use of a background editor, such as
Sidekick, can be of great benefit, since
it can be called up while you are working
in PC-KEY-DRAW. Be sure that the particu-
lar background program you are using works
when the screen is in a graphics mode!
The macro files are set up so that each
line is a command followed by a separator
(|) and the number of repetitions. The
command is the actual key stroke code.
While MaCRo files can be edited directly
it is easier to first convert them to TeXT
files using KD-TRANS.EXE.
Since errors you may make are recorded you
may want to edit them out of a slide show.
This can be done easily to the ASCII file
by removing only the commands and not the
cursor movement that may occur as part of
the command.
One of the most common editing method will
be the merging of files together to create
one big file. When merging files care must
be taken to ensure that all parameters are
set to the value needed by consecutive
parts of the macro. For example the cursor
position at the start of a macro will
determine the actual end result.
KEY MACRO 6-6
One handy feature of a key macro is the
ability to call a second macro at the end
of the first, allowing unlimited macros to
be chained together when run, but to
reside separately on disk. To avoid having
to edit the macro, work in reverse, start-
ing with the last section first and be
sure that each macro includes its own ini-
tialization.
Macro files contain the key strokes used,
followed by a separator (|) and a number
to indicate the number of times the key
was hit in a row. If the key was a command
it will only appear once while something
like a cursor movement key may have been
hit many times in a row. Text can be added
after the repeat number for the purpose of
placing remarks in a macro. This is espe-
cially convenient for including notes to
others on what the macro does and how to
use it. The following is a short example
of what a macro file would look like after
being translated with KD-TRANS.EXE to a
TeXT file:
KEY MACRO 6-7
SHFT-F10 |1 Force Color to Color 1
SHFT-F9 |1 Force Cursor Speed to 1
+ |4 Add 4 to the Cursor Speed
F2 |1 Select Function 2
p |1 Select polygon
5 |1 5 sided
RIGHT |9 Move right 9 times
[ |3 Rotate the polygon
F9 |1 Drop speed to 1
[ |1 Rotate the polygon
ENTER |2 End and indicate correct.
F9 |1 Toggle speed back to 5
LEFT |5 Move into polygon
F5 |1 Select F5 Paint & Pattern
ALT-P |1 Select Alternate paint
8 |1 Choose Color 8 for fill
1 |1 Choose Color 1 for border
ENTER |1 Confirm correct.
ALT-K |1 Select Key Macro
e |1 End
You can duplicate the above by simply
entering in the above keys the number of
times indicated. The remarks to the right
of the repeat number should not be
entered. Note that KD-TRANS expects the
key stroke name to be exactly 10 charac-
ters and spaces.
KEY MACRO 6-8
DOS and Macros: Macros can be called from
DOS as follows:
KD-DRAW FILENAME
where FILENAME is the name of the macro
file to be called once KD-DRAW is loaded.
A MCR extension is assumed. If another
extension is used it must be specified or
the file will not be found. This capabil-
ity allows the slide shows to be run by a
user knowing nothing about PC-KEY-DRAW or
allows set-up routines to be run to cus-
tomize PC-KEY-DRAW to your particular
application.
Macros can be called from BATch files or
macros can be DOS BATch files. It is pos-
sible to create a macro that is both a
BATch file and a PC-KEY-DRAW macro. This
allows for lots of possibilities with a
minimum of extra files on the disk. Some
care must be taken in setting up BATch
file and MaCRo file combinations. Use the
samples on the program disk as a guide.
Basically the BATch file is the first part
and the MaCRo the second. Since no action
is taken in a macro file until the separa-
tor (|) is located the BATch file is
ignored by the macro.
KEY MACRO 6-9
Run Time Mode: Starting with version 3.24
PC-KEY-DRAW can be set to work in a Run
Time Mode, so that the end user can view
and run macros without any knowledge of
PC-KEY-DRAW. To turn PC-KEY-DRAW into the
run time mode simply remove or rename KD-
DRAW.HLP. When KD-DRAW is called, if it
does not find KD-DRAW.HLP, it only allows
a macro to be run. In normal operation
when a macro is exited by <Esc>, normal
end of the macro, or an error control
returns to the CURSOR MODE. In a run time
mode when the macro is exited control
returns to DOS. If KD-DRAW.DFT is not
found the default drive is assumed to con-
tain everything required by the macro to
run unless a drive is specified in calling
the desired macro, in which case that
drive is assumed to contained the primary
files needed by the macro. There are no
restrictions to distributing PC-KEY-DRAW
as a Run Time program, ie. without KD-
DRAW.HLP, except if a charge for the disk
is made. If you wish to charge for a Run
Time version of PC-KEY-DRAW you must have
prior written permission.
KEY MACRO 6-10
Hot Keys: 27 keys can be assigned a macro
file name so that when the key is struck
the appropriate macro file is run immedi-
ately. The Hot keys are the following:
<Shft-F1 to F8>
<Ctrl-F1 to F10>
<Alt-F1 to F9>
If KD-DRAW.HOT is found on the program
disk or in the program directory on the
hard disk the Hot keys are activated. KD-
DRAW.HOT contains the listing of the key
macro files that correspond to the appro-
priate function keys. KD-DRAW.HOT can be
edited with any text editor that produces
pure ASCII files.
There are two primary applications for Hot
keys. The first is to assign commonly used
routines so that they can be called up
quickly as needed. A number of such rou-
tines are supplied on library disk #2 and
#3. For example BOLD.MCR produces bold
faced text from any text brought in with
<F6 Ctrl-t> or <F6 Alt-t>. The second use
of the Hot keys is for creating a tutorial
using the function keys with an on screen
menu.
The default HOT key file is KD-DRAW.HOT,
but HOT key files can have any name and
any number of HOT key files can reside on
a disk, up to the limit of disk space. To
change to a different HOT key use <Alt-k
f>unction to specify the name of the HOT
key file.
KEY MACRO 6-11
MAKe HOT LIBrary: HOT key files can be in
two forms, raw and compiled. A raw HOT key
file consists of the names of MaCRo files
next to the associated key strokes as in
Figure 6-1.
[hotraw]
Figure 6-1 Sample HOT key file header with
direct call of MaCRo files.
When a defined HOT key is pressed the
appropriate MaCRo file is run from disk.
While this method of HOT key operation
works fine, it can be very wasteful of
disk space since each MaCRo is a separate
file. MAKHOTLIB.EXE allows you to compile
or library a HOT key file so that all of
the MaCRo files become part of the HOT key
file. The first time MAKHOTLIB is run from
DOS it creates a blank HOT key file that
can be edited with a word processor or
text editor. If MAKHOTLIB is run when KD-
DRAW.HOT already exists it will combine
the KD-DRAW.HOT with the MaCRo files into
one file. The header of the HOT key file
is changed slightly to reflect that the
macros are located in the HOT key file and
not in a separate file. Figure 6-2 is the
same HOT key file header after being com-
piled with MAKHOTLIB.EXE.
KEY MACRO 6-12
[hotcomp]
Figure 6-2 Sample HOT key file header in
compiled form.
The ">" symbol is the GOTO command in PC-
KEY-DRAW. It is used to tell the macro
read routine to jump to the corresponding
label in the file. A label in this case is
the file name preceded with ":". This
would be all that is needed to operate a
HOT key, but in a large file searching for
the appropriate label can be rather slow.
The number following the macro file name
is the location of the beginning of the
appropriate macro in the file, allowing
the macro read routine to jump directly to
the appropriate place in the HOT key file
to begin the macro execution. The GOTO
symbol (>) and the file offset value are
added by MAKHOTLIB.EXE when it is run.
KEY MACRO 6-13
Supplied Macros: Numerous macros are sup-
plied with PC-KEY-DRAW. Some are for dem-
onstration of the programs capability,
some are more entertaining then anything
else, while others perform various rou-
tines that are of use to a serious PC-KEY-
DRAW user. The following discusses several
of the more significant macros. Most of
the supplied macros have remarks that can
be read using a text editor or simply
TYPEd from DOS to show instructions for
the macro. Use <Alt-1> <F6 T a> from
PC-KEY-DRAW to read the macro remarks
before running it. Be sure to answer <n>o
when asked if correct or the text will
become part of your drawing. It is a good
idea to add remarks to any macros that you
write. In particular you should provide
information as to any premacro operations
that are needed for successful operation
of the macro. Remarks can be added with a
text editor.
Sample Demo: A sample demo is included on
the program disk. It was created in sev-
eral sections and then edited together.
Note that the prompt line has been turned
off for most of the demo for a cleaner
look and faster execution. DEMO.BAT (for-
mally SAMPLE.MCR) may stop at several
points and wait for input from the key-
board before continuing. A short line is
displayed in the bottom right corner when
the macro is waiting for user input. The
<Alt-p> command could also be used when
you want the macro to suspend operation
for a specified length of time. DEMO.BAT
is both the Batch file and the macro.
KEY MACRO 6-14
Slide Show Demo: A demo slide show is
included with the numerous screens and
pictures on Library Disk #1. SCNSHOW.MCR
is a macro that calls previously created
screens and partial screens using a vari-
ety of display techniques. This method of
operation is similar to other Slide Show
programs, but far more powerful.
[iris]
Figure 6-3 IRIS3.SCN created with
IRIS2.MCR, Brenda Kidera.
Drawing Demo: Library Disk #2 contains the
macro IRIS2.MCR that creates a drawing of
an iris from scratch. You can watch the
moves that the artist made to construct
the drawing. Mistakes and changes of mind
have been left in to show the process
behind the picture. The completed picture
is contained in IRIS3.SCN. My wife Brenda
drew this picture. She is an artist which
becomes very clear seeing the results of
IRIS2.MCR. IRIS2 took 4 hours from start
to finish to create, edit the macro, and
eat dinner. IRIS2.MCR must be started in
medium resolution mode for proper results.
KEY MACRO 6-15
Routines: Library Disk #2 contains several
useful routines. Two of the most useful
are OVERLAY.MCR and OVERLAY2.MCR. Both
take an object currently being animated
and through a series of steps overlay the
object onto the background. Which one you
use depends on the object that is to be
overlaid. OVERLAY will leave a dark out-
line around the object which is ideal for
many, but not all objects. OVERLAY2 does
not leave the outline and is therefore
better for certain objects. Both macros
were written to make use of SCreen 2 and
SCreen F7 as workspaces, so anything in
these screens when you call the macro will
be lost. It would be easy to write a macro
that does not use SCreen 2, but uses the
disk for temporary storage instead.
A number of text oriented routines have
been compiled and included in KD-DRAW.HOT
on the program disk. It is recommended
that the header for KD-DRAW.HOT be printed
out and used as a reference during program
operation. For more information on the
individual routines see the corresponding
files on library disks #2, #3, and #4.
Many the macros have instructions in the
form of remark statements in the macro.
Create your own routines and add them to
KD-DRAW.HOT or create another HOT key file
for the routines that you commonly use.
KEY MACRO 6-16
──────────────────────────────────────────
7 - PAGES AND LAYERS
──────────────────────────────────────────
PC-KEY-DRAW version 3 allows you the
option to draw using up to 64 pages or 64
layers. The two cannot be used at the same
time. Pages and layers are saved on the
workspace disk, which can either be a RAM
disk, hard disk, or floppy. In a page mode
a drawing 2560 pixels by 1600 pixels is
possible in the medium resolution mode.
To use all 64 pages/layers about 1.2 megs
of memory is required. In addition, to use
more than about 20 pages/layers you must
set up a subdirectory for the workspace.
See your DOS manual for information on
creating and using subdirectories.
[work1]
Figure 7-1 PC-KEY-DRAW in SCreen 1 and
PaGe 00.
PAGES & LAYERS 7-1
Screens: There are four screens available
for creating drawings. Generally you will
use SCreen 1 or SCreen 2 as the main draw-
ing screen. You must be in SCreen 1 to
access the pages. The other main screen is
generally used as a temporary workspace or
for holding symbols, shapes, patterns that
you need to access quickly and repeatedly.
If you are using layers SCreen 2 becomes
the visual layer and SCreen 1 is the
active layer. Figure 7-1 shows a picture
being worked on while in SCreen 1 PaGe 00.
SCreen 3 is called F7 and it shows that
last object copied, erased, animated, etc.
Most of the drawing functions can be used
in F7, although some may behave differ-
ently. F7 is an ideal screen to use to
modify something that was just copied
before placing it on the drawing. For
example to change the color of a FONT
before placing it on one of the main
screens. <F8 o>ld, <F8 O>ld sequential,
and <F8 s>ave work differently in SCreen
F7. Instead of manipulating full screens
the partial screens normally associated
with the F7 key are retrieved or saved.
This makes <F8 O>ld sequential particu-
larly useful since it lets you browse
through the partial screens as you nor-
mally would with the full screens.
The final screen is very limited and con-
tains the 25th line of the main screens.
Screens are different from pages in sev-
eral important ways, but perhaps the most
significant is where they are stored.
Screens are stored within the 192K the
program uses, while pages, other then the
current page, are stored on the workspace
disk. For fast access use a RAM disk.
PAGES & LAYERS 7-2
Pages can be used when you want to create
a picture that is larger than can be rea-
sonably accommodated on a single screen.
This might be a large flow chart, mechani-
cal drawing, or just a big painting. Basi-
cally the pages are arranged on an 8X8
grid although they can be used as 64 ver-
tical pages if desired. It is possible to
scroll by 1/2 page either horizontally or
vertically. To use pages you must be in
SCreen 1. Portions of a page can be
readily transferred between other pages
using the <F7 c>opy function. Pages must
be saved separately to disk. While in page
mode the cursor line will show SC1 PG00
when in SCreen 1 & PaGe 00.
To scroll from one page to another use
<Ctrl-Home> to display current position
and then use the arrow cursor keys to
scroll/pan in the direction of the arrow
by one half screen. Use <PgUp> or <PgDn>
to move a full page at a time. <Home>
returns you to PaGe 00 and <End> takes you
to the maximum page that has been created.
When scrolling the current screen is saved
to the workspace disk, if anything has
been added, and the disk is searched for
the existence of the page you are moving
to. If the page was previously created it
is shown, otherwise a blank page is shown.
Selecting <Ctrl-Home> twice displays PaGe
00 without saving the page you are cur-
rently on. This is how multiple pages pre-
viously created are restored.
PAGES & LAYERS 7-3
Version 3.50 has added the ability to show
a map of the pages by selecting <Ctrl-
Home> followed by <?>, <h>, or <H> for
help. With the map displayed the cursor
will move the active screen window around
on the virtual page until <ENTER> is
selected to select the desired portion of
the page to work on. Figure 7-2 shows how
the map looks while working in medium res-
olution.
[pagemap]
Figure 7-2 PAGE map of pages. The current
active page is PaGe 11. Use cursor keys
to move around and then select with
<ENTER>.
The ability to use multiple screens allows
some very detailed printed output on laser
printers. Consider drawing on just four
pages then printing them out side by side
on a laser printer for a 1280X800 dot res-
olution picture from a standard graphics
card.
PAGES & LAYERS 7-4
Layers or overlays are very powerful and
useful. Think of them as drawing on sev-
eral layers of clear plastic. Only the
active layer is effected by the various
functions. The other layers can be visual
as desired. To use layers you must be in
SCreen 1, as it is the active screen.
SCreen 2 becomes the visual screen and
holds copies of all layers that are
visual. To use correctly, start with
SCreen 2 being clear. Draw the first por-
tion of the graphic on SCreen 1 and then
declare a layer with <Ctrl-l>. This trans-
fers SCreen 1 to SCreen 2, saves it to
disk and clears SCreen 1. With SCreen 2
now being overlaid with SCreen 1 the draw-
ing will initially look the same. Continue
drawing and as appropriate declare the
next layer and so on. There are many uses
of layers and many ways that they can be
used. Proper use of layers can greatly
speed the creation of complex drawings. As
with pages, if you want to save the vari-
ous layers you must do so separately. When
layers are activated the prompt line will
show SC1L0* when in SCreen 1 and Layer 0.
The * indicates that not only are layers
active, but that the visual layer is cur-
rently being shown along with the active
layer. If the prompt line reads SC1L3 it
means that you are in SCreen 1, Layer 3
and only the active layer is being shown.
A simpler way of using the layer feature
is to load a pattern screen into SCreen 2.
For example a screen containing perspec-
tive lines might be put in SCreen 2 as the
visual layer. Switch to SCreen 1 and acti-
vate layer with an <l>, causing the per-
spective screen to be shown aiding in cre-
ation of a perspective drawing.
PAGES & LAYERS 7-5
Another use for layers is to load a com-
plex object as the visual layer and use
the active layer to trace the visual layer
and save it in a vector format.
Saving Pages/Layers: As noted the layers
and pages must be saved separately from
within the program. An alternate method of
saving layers/pages can be accomplished
from DOS. After completing the various
pages exit the program to DOS. If the
workspace drive is the same as the drive
you save drawings on, then use the follow-
ing command in DOS, after switching to the
workspace drive:
REN PAGE.* FILE.*
where FILE is the name that you want the
file to have. To recall the file at a
later date you must first rename it as
follows:
REN FILE.* PAGE.*
Run the program and select <Ctrl-Home>
twice to restore the first page.
If you use a RAM disk for a workspace then
a slightly different procedure is needed
to save the drawings from DOS. Instead of
RENaming the files COPY them to the
desired disk (X:) as follows:
COPY PAGE.* X:FILE.*
And to retrieve the files use:
COPY X:FILE.* PAGE.*
Enter the program and retrieve the files
using <Ctrl-Home> twice.
PAGES & LAYERS 7-6
Compressed Saves: A modification of the
above technique can be used to not only
save the pages or layers, but to compress
them and combine them into a single file.
Several programs are available such as
ARC, LUE/LUU, and PKARC that can compress
and library files. At the time of this
writing PKARC may be the best all around
choice for archiving your files. The
graphics screens can be significantly com-
pressed and by combining them into one
file they can more easily be kept track
of. Which library program you use is up to
you, but a faster one has some advantage
over an more efficient one. By writing the
appropriate macro-batch file combination
the entire operation can be operated to
the point where the user has little knowl-
edge of what actually takes place.
!REMEMBER!
<F8 s>ave will save only the screen you
are in and not the pages and layers. Refer
to the previous discussion for information
on how to save pages and layers. KD-LASER
will use the PAGE.* files to print from.
PAGES & LAYERS 7-7
──────────────────────────────────────────
8 - LIBRARIES
──────────────────────────────────────────
PC-KEY-DRAW provides 6 methods of saving
libraries of commonly used pictures,
screens, fonts, vectors, macros, and pat-
terns. Line drawings can be saved as vec-
tors for later recall at any angle and
scale using F6. Portions of the screen can
be saved as bitmapped images under F7.
Fonts can be created and then saved using
F7, as can patterns. Entire screens are
saved with F8, while key macros can be
created for a wide variety of uses. PC-
KEY-DRAW can also save files as a BASICA
subroutine.
Vector Saves are ideal for creating
objects that need to be retrieved at dif-
ferent angles and sizes. Possible uses
include electrical schematics, flow
charts, architectural symbols and more.
Each element is saved with its own name,
providing easy recall of the elements by
name. Artists could use this to create
special brush patterns/shapes to paint
with. VCT is the default extension. Cur-
rently the only objects that can be saved
as vectors are those created entirely from
lines, dots, parallel lines, or spoke
lines. On ending the line drawing with <F6
E>nd the vector can be named and saved to
disk for later use. A vector file contains
the x and y coordinates of the object
along with color and width information.
Previously created vector files can be
loaded with <F6 o>ld. The scale factor is
matched to that of the drawing unless
forced to something else. The rotation
angle can also be set.
LIBRARIES 8-1
Picture Saves are used for complex
objects. They are ideal for animation and
a whole lot more. One use is to create
small patterns to use as brushes for
painting with, but a more common use is to
save parts of the screen for use in other
drawings. <F7 C>opy & save is used to copy
an area from the screen and save it to
disk. PICtures are ideal for animation.
PIC is the default extension. A FIG exten-
sion can be specified which results in the
file being saved as a series of ASCII num-
bers. The files can be retrieved with <F7
o>ld or <F7 O>ld & place. <F7 o>ld brings
the file in to animate, while <F7 O>
places it directly on the screen. To view
all of the PIC files on the drawing disk,
move to SCreen F7, select <F8 O>ld, and
the files will be brought in one at a time
and displayed in the upper left corner of
the screen.
Font Saves provide a method of saving
small commonly used portions of a screen,
such as text, but not limited to text. The
portions of the screen are created indi-
vidually and saved under a common file.
They are retrieved with <F6 Alt-t> based
on the letter assigned to each picture
when saved. FNT is the default extension.
To save a character use <F7 C>opy and name
the file with an FNT extension. You will
be prompted for the character that corre-
sponds to the one just copied. To ensure
that the characters line up properly be
sure to be consistent with the location of
the top of the character. To modify the
default letter and word spacing select
<Space Bar> when prompted for the charac-
ter and enter the desired size in pixels.
TYPEMAKE.MCR (on Library Disk #3) creates
an unusual looking text font from the pri-
LIBRARIES 8-2
mary text fonts. The created font is
readily available as KD-FONT3.FNT, but it
is interesting to watch as it is created.
Directions for TYPEMAKE.MCR are contained
in the file.
Screen Saves can be used as a library by
saving multiple pictures on one screen and
then recalled using template of F8. This
lets you group commonly used pictures
under one name and uses them as desired.
Generally saving complete screens will be
the most commonly used storage method. SCN
is the default extension. SCN files can be
view sequentially for either SCreen 1 or
SCreen 2 by selecting <F8 O>ld.
Pattern Saves are in the same basic format
as PICture saves, only arranged as 40 X 23
blocks for retrieval using the pattern
fill function of F5. Actually any PIC file
can be used as a pattern file. Pattern
files can be used for simple painting or
definitive patterns used for architecture
or cartography can be created. 64 differ-
ent patterns can be saved in one file.
The <F1 Ctrl-z> screen size is identical
to the pattern size. PIC is the default
extension. PATMAKE.MCR (on Library Disk
#2) will create a blank pattern screen
with a grid of 64 blocks that can be
replaced with the patterns you are creat-
ing.
Macro Saves have many, many uses. See sec-
tion on KEY MACRO for details as to macro
use. MCR is the default extension.
LIBRARIES 8-3
BASICA Saves are accomplished in much the
same way as PICture or pattern saves
using <F7 C>, except that when a BAS
extension is added to the file name the
file is saved as a subroutine that can be
merged into a BASICA program that you are
writing. The file will always start a line
number 20000 so you will have to RENUMber
before merging several together. The sub-
routine created can be called and will
load an array with the data so that the
array can be put on the screen using the
PUT command of basic. This is ideal for
writing games or for writing programs with
graphical interfaces. PUT is an ideal way
to get simple animation in a BASICA pro-
gram. Any of the files on the library
disks can be turned into BASIC subrou-
tines. See your BASICA manual for detail
information on merging BASICA files, and
using graphic commands, like PUT and GET.
Creating Libraries: While PC-KEY-DRAW is
ideal for creating libraries, it currently
comes with a limited supply of libraries.
I have created many libraries for my own
use, but they include things that would be
of little use to anyone else. Most of the
libraries I have created relate to motion
compensated cranes and there just isn't
much call for such symbols. At the time of
this writing PC-KEY-DRAW includes twenty-
six font libraries, seven pattern librar-
ies, and a number of macro libraries. I do
not have the time or the talent to create
general purpose libraries, but some of you
might. Please send any libraries that you
create to me for evaluation. Unregistered
users can receive credit towards register-
ing, while registered users can receive
credit towards updates or CA$H back. Yep,
I am willing to pay for good libraries in
LIBRARIES 8-4
any of PC-KEY-DRAW's formats, including
printer configuration. The actual price
will depend on the type, quality, and gen-
eral use of the library. Please indicate
what you think the library is worth.
I reserve the right to withdraw this offer
at any time. Please send original librar-
ies only and not copies of other program
libraries.
Library Disks: Several library disks are
supplied with PC-KEY-DRAW. The library
disks contain numerous files saved with
many of the possible save techniques
offered by PC-KEY-DRAW. Library files
available include macros, pictures,
screens, fonts and patterns.
LIBRARIES 8-5
──────────────────────────────────────────
5 - PRINTING
──────────────────────────────────────────
PC-KEY-DRAW currently provides three meth-
ods of printing graphics. The primary
method a graphics printing is to perform a
screen dump to a dot matrix printer that
is Epson or IBM graphics compatible. The
second method is the zoom printing method
which can be set up to work with almost
any printer. See Appendix B: for informa-
tion on configuring the program for your
printer. For those with an HP LaserJet or
compatible a third printing method is pro-
vided. Alternately, the user can use third
party programs to print their graphics.
This manual was printed with the aid of a
commercial program called INSET.
Screen Dump: The most common way to print
a graphic screen is the use of a simple
screen dump. The key to performing a
screen dump is the use of the DOS program
GRAPHICS.COM that comes with all versions
of DOS. Run GRAPHICS as part of your AUTO-
EXEC.BAT, as part of KD.BAT, or directly
from DOS. Depending on the version of DOS
you are using, when GRAPHICS is run a mes-
sage may or may not appear telling you
that GRAPHICS is loaded.
Most users should be aware that hitting
<Shft-PrtSc> while in a text screen will
dump a copy of the screen to their
printer. GRAPHICS.COM extends this capa-
bility to the graphics modes of your IBM
PC. While in PC-KEY-DRAW hitting <Shft-
PrtSc> with GRAPHICS loaded will dump a
copy of the screen to the printer. This is
a complete copy of the screen including
PRINTING 9-1
the cursor, help menu, grid and prompt
line. Generally, it is desirable to print
the picture and only the picture. <s>how
can be used to show only the picture on
the screen, thus when a screen dump is
invoked the print out will contain only
the desired information. PC-KEY-DRAW pro-
vides a more direct way of printing by
selecting <F8 p>rint, which will allow you
to change the 25th line and then print the
picture and the picture only. Essentially
<F8 p> invokes a <Shft-PrtSc> so you don't
have to.
If the drawing covers more than a single
screen, each screen will have to be
printed individually and then put together
manually. A reducing copy machine can be
used to provide single sheet size from
multiple pages. Some users report success
in transferring the multiple pages to
blueprints for use in architect and lands-
cape design.
A screen dump will behave differently
depending on the video mode the program is
in. To print the screen sideways on the
paper, perform printing from the high res-
olution mode. To print the screen across
the top of the paper, perform printing
from the medium resolution mode.
GRAPHICS.COM from your DOS disk is not the
only screen dump program that can be used
with PC-KEY-DRAW. Some printers come with
their own drivers, for example the Okidata
color printer includes a screen dump rou-
tine that lets you print PC-KEY-DRAW
images in full color. There are also
screen dump programs in the public domain
and a number of commercial programs
designed to replace GRAPHICS.COM.
PRINTING 9-2
Zoom Printing: Banners and posters can be
created on a dot matrix printer or even a
daisy wheel printer using the zoom print-
ing functions of PC-KEY-DRAW. There are
many programs design to print banners,
but PC-KEY-DRAW is the only one designed
to print posters. The zoom printer uses
text characters on the printer to repre-
sent the colors on the screen, thus in
medium resolution four different text
characters are used in printing, while in
high resolution only two characters are
needed. The entire screen can be printed
using <F8 P> or just a portion of the
screen with <F8 Ctrl-p>. The user must
specify the characters to use and the size
of the print out. Size 1 is the smallest,
printing a single character at 15+CPI for
each dot in the image to be printed. Size
2 prints a single character at 12 CPI for
each dot. Size 3 uses 10 CPI to print each
character.
The higher numbers in zoom printing pro-
vide multiples of the lower numbers. See
Chapter 4 for a zoom printer sizing chart.
A number of zoom printer drivers are sup-
plied on the program disk and PC-KEY-DRAW
provides the capability to create your own
drivers for printers not supported. See
Appendix B: for configuration information.
PRINTING 9-3
LaserJet Printing: The most advanced
printing capability of PC-KEY-DRAW is
available for the HP LaserJet or any
printer that emulates the LaserJet. KD-
LASER.EXE can be use to print multiple
pages or to combine separate screens
together as one. KD-LASER allows the user
to specify the resolution to use, the por-
tion of the screen to print, and allows
inverting the video. To print multiple
pages created in the virtual page mode of
PC-KEY-DRAW simply specify the workspace
drive where the PAGE files reside and
enter PAGE as the name of the file. PC-
KEY-DRAW's brochure was created in this
fashion. Future versions of the program
will expand the features of KD-LASER to
most dot matrix printers.
Alternate Printing: PC-KEY-DRAW can be an
ideal tool for creating graphics to be
printed with other programs. The pictures
in this manual were all created with PC-
KEY-DRAW, but were printed with INSET.
INSET allows graphics to be mixed with
text from a standard word processor. It
sits in the background and allows graphics
to be positioned and sized on the screen
with the text while editing. It then takes
over when printing and inserts the pic-
tures in text.
Pictures created with PC-KEY-DRAW can also
be used with various desktop publishing
programs, such as Ventura Publisher. Cur-
rently the screens must be captured with
GEMCAP or translated with one of a number
of image file format translators available
in the public domain or commercially.
Future versions of PC-KEY-DRAW will pro-
vide direct read and write of IMG files.
PRINTING 9-4