Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-Filevs_color()vq_color() VDISyntaxWORD vq_color( handle, index, flag, rgb)
WORD handle, index, flag;
WORD *rgb;
Function vq_color() returns RGB information for a particular VDI color index.
Opcode 26
Availability Supported by all drivers.
Parameters handle specifies a valid workstation handle. index specifies
the VDI color index of which you wish to inquire. rgb points
to an array of 3 WORDs which will be filled in with the red,
green, and blue values (0-1000) of the color index. The
values returned in the RGB array are affected by the value
of flag as follows:
Name flag Values returned in rgb
COLOR_REQUESTED 0 Return the values as last requested by
the user (ie: not mapped to the actual
color value displayed).
COLOR_ACTUAL 1 Return the values as the actual color
being displayed.
Binding contrl[0] = 26;
contrl[1] = 0;
contrl[3] = 2;
contrl[6] = handle;
intin[0] = index;
intin[1] = flag;
vdi();
rgb[0] = intout[1];
rgb[1] = intout[2];
rgb[2] = intout[3];
return intout[0];
Return Value vq_color() returns -1 if the specified index is out of range
for the device.
Comments Some drivers for color printers do not allow you to modify
the color of each register. A simple test will allow you to
determine if the driver will allow you to change index colors as follows:
Call vq_color() with a flag value of 0 and save the return.
Call vs_color() to modify that color index by a signifigant
value.
Call vq_color() with a flag value of 0 and compare with
what you set.
Restore the old value.
If equivalent values are returned, you may modify each
color index.
See Also vs_color()Group VDI Inquire