VARKON Version 1.15 1997-10-24
cre_color - Procedure
Creates a color
Description
Sets the RGB color value for a pen. Pen numbers range from 0 to 255. Pen 0 is used for background in graphics windows and pen 1 is the default pen for drawing. Pen 0 and 1 are always defined in Varkon's resource- or ini-file. Additional pens may be defined there as well but usually not all 256.
cre_color() can be used by a module to create or change a large number of pen colors automatically. It is good advice however not to change the default RGB values of pen 0 and 1.
A pen color is defined by mixing different intensities of Red, Green and Blue color (RGB). No intensity is 0 and full intensity is 255. This gives what is often referred to as 24 bits of color or True Color. If the hardware of the computer does not support true color Varkon uses the closest match to the desired color.
Syntax
cre_color(pen, red, green, blue)
INT pen; INT red; INT green; INT blue;
Principal parameters
pen - Pen number. 2 - 255 red - Red intensity, 0 - 255 green - Green intensity, 0 - 255 blue - Blue intensity, 0 - 255
Optional parameters
None.
Comments
Colors may look different on different computers due to differences in hardware. Varkon uses the specified RGB-triplet as it is without gamma correction.
Copyright © Microform AB Henningholmsgatan 4 S-703 69 Örebro SWEDEN E-mail: info@microform.se