home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
KAYPRO
/
K4SKETCH.LBR
/
K4SKETCH.DZC
/
K4SKETCH.DOC
Wrap
Text File
|
2000-06-30
|
4KB
|
86 lines
S K E T C H
Screen Editor for Graphics Kaypros
Version 1.0
by Eric Mausolf
Seattle, Wa.
I wrote this program in order to sketch out how I might want a display
screen in a program to look before I had to sit down and write code. I use
SKETCH to fiddle with the graphics until I get the screen looking how I want
it to look. I then copy down the coordinates of what I see on the screen in
order to recreate it in a program. Having to write down coordinates isn't
very convenient, but at least it beats the trial and error of writing code
and running it to see what happens. Of course, this program can also be
used as a deluxe Etch-a-Sketch.
SKETCH has two primary methods of operation. While in Erase or Draw modes,
you can erase or draw lines by moving a pixel-sized cursor around the screen
with the arrow keys, or use some of the special drawing commands available
in these two modes. In Write mode, you can write regular characters on the
screen. These characters can be set to any combination of the video attri-
butes available on graphics-capable Kaypros (blinking, underlined, etc.).
COORDINATES: Coordinates of the cursor are shown on the status line.
In Erase or Draw modes, the coordinates shown are the vertical and hori-
zontal coordinates according to the system built into the Kaypro hardware.
They are the coordinates sent out directly to the Kaypro terminal to draw
pixels or lines.In Write mode, the coordinates shown are the X and Y
coordinates as they are referenced by Turbo Pascal (top left corner
is (1,1)). This system allows coordinates to be quickly copied down so
the graphics can be quickly translated into program code (in Turbo at any
rate). If you want to see sample graphics access procedures, look at the
source list for this program.
DRAW AND ERASE MODES: These modes draw and erase pixels and lines. The
following commands are used under both of these modes. Under Draw Mode,
the commands draw lines and pixels. Under Erase Mode, the commands erase
lines and pixels. NOTE that the commands that require the user to enter
coordinates will not accept coordinates that are not on the screen, and
you must enter legal coordinates before the program will proceed. The
commands (all one letter) available are:
<E> Shifts to Erase Mode.
<D> Shifts to Draw Mode.
<W> Shifts to Write Mode (detailed below).
<M> Memorizes the current position of the cursor.
<R> Returns cursor to the position previously memorized.
<D> Draws or Erases (depending on Mode) a line to the memorized position.
<J> Jumps the cursor to the position you are prompted to supply.
<P> Plots (draws or erases) a line to the coordinates you supply.
<C> Draws or erases a circle at a radius you specify from the cursor.
<N> Clears the screen (gives you a New screen).
<Q> Quit to system.
WRITE MODE: This mode allows you to write regular characters along with
the graphics created in Draw and Erase modes. These characters can be
set to any combination of the video attributes available on the Kaypro.
All commands in Write mode are preceeded by pressing the escape key.
Thus, pressing <ESC> B would cause all further characters pressed to blink
on the screen. Commands are cumulative, so that pressing <ESC> U along
with <ESC> B would characters to be printed as both blinking and under-
lined. This means that if you want to go back to just blinking, you
have to press <ESC> N to set the attributes back to normal, and then press
<ESC> B to re-engage the blinking attribute. The cursor can be freely
moved about the screen with the arrow keys. To erase, you can either back
over characters with the DEL key or overwrite them with spaces.
NOTE: The commands available in Erase and Draw modes are NOT available
in Write mode. To access these commands (including Quit and New Screen)
you must go back to Erase or Draw mode by pressing the escape key twice.
Go back to Write Mode by pressing W. The commands available in Write
Mode are:
<ESC> plus:
<D> Print characters dim (half-intensity).
<B> Print characters blinking.
<U> Print characters underlined.
<W> Print characters in inverse (White) video.
<G> Print characters in dim inverse (Gray) video.
<ESC> Go to Erase and Draw Modes.
-------- end of SKETCH description --------