home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
educatin
/
k-ching.lbr
/
KSCREEN.DZF
/
KSCREEN.DEF
Wrap
Text File
|
1987-12-04
|
3KB
|
57 lines
DEFINITION MODULE KScreen;
TYPE
VideoAttribute =
(HiInverse,Dim,Flash,Underline,Cursor,LoInverse,Normal);
PROCEDURE SetVideo(Attribute: VideoAttribute; Switch: BOOLEAN);
(* Turns various Kaypro-specific options on and off, according to Switch.
Normal,FALSE will undo everything except the Cursor attribute --
Normal,TRUE will undo everything and turn the cursor ON.
SetVideo uses the standard Write procedure and does not affect
cursor position.*)
PROCEDURE DrawLine
(fromX, fromY, toX, toY: CARDINAL; DrawEr: BOOLEAN);
(* Draws or Erases a line from X,Y to X,Y according to whether the fifth
parameter, DrawEr is True or False [ie TRUE will Draw].
Due to the "Step" nature of mapping linear equations with integer co-ords
the line x1,y1,x2,y2 <> x2,y2,x1,y1! Rather it is its mirror image.
To ensure consistant results, be sure to always specify line co-ords in
the same order, particularly when erasing a previously drawn line.
If X>159 or Y>99 nothing happens!
Negative Co-ords are NOT allowed! *)
PROCEDURE Pixel(xpos,ypos: CARDINAL; DrawErase: BOOLEAN);
(* Draws or Erases a pixel at the screen co-ord given by [xpos,ypos] if
DrawErase is TRUE or FALSE. This procedure will only place a pixel on the
screen if that character position is BLANK [ie occupied by a space].
If Xpos or Ypos is outside the normal screen range of 0..159,0..99
it will be drawn, but at MOD160 or MOD100, respectively *)
PROCEDURE GCharWrite(GraphicsCharacter: CHAR);
(* WRITES the 8-bit graphics character specified by the ordinal value of
GraphicsCharacter at the present cursor position. GraphicsCharacter must be
in the normal CHAR range of 0..255 and is composed of 8 pixels which are
turned on according to the following bitmap:
2 1
8 4
32 16
128 64
*)
PROCEDURE BlinkBlock(Blink,Block:BOOLEAN);
(* If Blink is TRUE then the cursor will blink
if not it will be simply sit there.
If Block is TRUE then the cursor will have its normal shape
if not it will be an underline.
A call to SetVideo(Cursor,TRUE) or SetVideo(Normal,TRUE)
will return you to a blinking cursor
so if you really want another kind, you'd better call this routine
after each call *)
END KScreen.