Sets the color on the printer.
Restriction: This routine is not currently supported on UNIX platforms.
Syntax:
call "PC_PRINTER_SET_COLOR" using printer-handle
by value fore-or-back
by value color-red
by value color-green
by value color-blue
returning status-code
Parameters:
|
Using call prototype (see
Key)
|
Picture
|
printer-handle
|
cblt-x4-comp5
|
pic x(4) comp-5.
|
fore-or-back
|
cblt-x2-comp5
|
pic x(2) comp-5.
|
color-red
|
cblt-x2-comp5
|
pic x(2) comp-5.
|
color-green
|
cblt-x2-comp5
|
pic x(2) comp-5.
|
color-blue
|
cblt-x2-comp5
|
pic x(2) comp-5.
|
status-code
|
See
Library Routines - Key
|
On Entry:
-
printer-handle
- The handle of the printer, returned when the printer was opened.
-
fore-or-back
- Whether to set the foreground or background color:
1
|
Foreground
|
2
|
Background
|
-
color-red
- Value between 0 and 255; intensity of red
-
color-green
- Value between 0 and 255; intensity of green
-
color-blue
- Value between 0 and 255; intensity of blue
On Exit:
status-code
|
No status codes are returned by this routine.
|
Comments:
You must open the printer before using this routine.
You specify the color you want by combinations of values showing the intensity of the three primary colors. For example, to get the colors in the following table, you set the RGB values as shown:
Some other, more unusual, colors are:
If your printer does not support color, it is up to the printer device driver to interpret these values. For example, some perform gray-shading; others choose either black or white for each color.