home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
turbo_c
/
tc130.arc
/
VIDCOLOR.DOC
< prev
next >
Wrap
Text File
|
1987-08-20
|
2KB
|
48 lines
NAME
vid_border -- set border color
vid_palette -- set color palette
SYNOPSIS
(void) vid_border(clr);
(void) vid_palette(num);
int clr; one of the 16 color values
int num; palette 0 or 1
DESCRIPTION
These two functions manipulate the CGA card, or EGA card in
CGA color mode. vid_border() sets the border color outside the
normal text area to any of the 16 possible colors.
vid_palette() sets the working color palette, and has meaning
only in CGA mode 4 (color 320 x 200).
palette # colors 0, 1, 2, 3
0 background, green, red, brown
1 background, cyan, magenta, white
Call vid_palette() before using the vid_wrpix() function.
In black&white 640 x 200 graphics mode, vid_border() will set
the foreground color used for the display. The background
will always be black.
vid_border() may be used in conjunction with the direct
video access functions.
EXAMPLE
vmode(CG320); /* set 320 color graphics mode */
vid_border(BLUE); /* set border and graphics background color */
vid_palette(1); /* select palette 1 */
vid_wrpix(10, 10, 2) /* write a pixel at x10, y10, color 2,
which is magenta in palette 1 */
This function is found in SMTCx.LIB for the Turbo-C Compiler.