[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
R_SetRGB()
Changes the composition of a specific colour
------------------------------------------------------------------------------
Syntax
R_SetRGB ( nRegNr, nRed, nGreen, nBlue )
Parameters
nRegNr Number of the colour register to change
(range 0-63; codes are in RPCXLib.CH)
nRed Units RED to be used (range : 0-63)
nGreen Units GREEN to be used (range : 0-63)
nBlue Units BLUE to be used (range : 0-63)
Returns
NIL
Description
Function R_SetRGB makes it possible to define ones own 16 Clipper
colours. They can be replaced by self mixed colours.
There are 64 x 64 x 64 = 262.144 (!) possible colours so almost
any desired colour can be composed and used in applications.
Example
&& Replace the Clipper colour GREEN by a self mixed colour.
&& The new colour is composed of 5 units RED, 30 units GREEN
&& and 30 units BLUE
*-- RPCXLib definitions
#include "RPCXLib.CH"
R_SetRGB ( PL_GREEN, 5, 30, 30 )
A nice example of interactive mixing of colours can be found
in RPCXDemo.PRG.
See Also:
R_GetRGB()
R_DefPal()
R_RestPal()
R_SavePal()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson