libcrtxy color manipulation and conversion
[The CRT X-Y library (libcrtxy)]

XY_color XY_setcolor (Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Combines values for R, G, B and A components into an XY_color.
void XY_getcolor (XY_color c, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
 Breaks an XY_color into its R, G, B and A components.

Typedefs

typedef Uint32 XY_color
 XY_color - libcrtxy color type.

Typedef Documentation

typedef Uint32 XY_color

XY_color - libcrtxy color type.


Function Documentation

XY_color XY_setcolor ( Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Combines values for R, G, B and A components into an XY_color.

Parameters:
r Red component (between 0 and 255).
g Green component (between 0 and 255).
b Blue component (between 0 and 255).
a Alpha component (between 0 (transparent) and 255 (opaque)).
Returns:
An XY_color representing the RGBA values provided.

void XY_getcolor ( XY_color  c,
Uint8 *  r,
Uint8 *  g,
Uint8 *  b,
Uint8 *  a 
)

Breaks an XY_color into its R, G, B and A components.

Parameters:
c An XY_color from which color components should be extracted.
r Pointer to a variable to contain the red component.
g Pointer to a variable to contain the blue component.
b Pointer to a variable to contain the green component.
a Pointer to a variable to contain the alpha component (0 represents transparent, 255 represents opaque).


Generated on Tue Sep 2 23:45:36 2008 for libcrtxy by  doxygen 1.5.5