enesim  0.0.23.1
Drawinglibrary
Defines | Typedefs | Functions
Color
Basic types

Color definition. More...

Defines

#define ENESIM_COLOR_FULL   0xffffffff
#define ENESIM_COLOR_NONE   0x00000000

Typedefs

typedef uint32_t Enesim_Color

Functions

EAPI Enesim_Argb enesim_color_argb_to (Enesim_Color c)
 Transform the given premultiplied color to a ARGB one.
EAPI Enesim_Color enesim_color_argb_from (Enesim_Argb argb)
 Transform the given ARGB color to a premultiplied one.
EAPI Enesim_Color enesim_color_components_from (uint8_t a, uint8_t r, uint8_t g, uint8_t b)
 Return a premultiplied color from the given components.
EAPI void enesim_color_components_to (Enesim_Color color, uint8_t *a, uint8_t *r, uint8_t *g, uint8_t *b)
 Retrieve the component of the given premultiplied color.

Detailed Description

Color definition.


Define Documentation

#define ENESIM_COLOR_FULL   0xffffffff

ENESIM_COLOR_FULL

Simple definition of a full (opaque white) color

#define ENESIM_COLOR_NONE   0x00000000

ENESIM_COLOR_NONE

Simple definition of a no (transparent black) color


Typedef Documentation

Internal representation of an ARGB color


Function Documentation

Transform the given premultiplied color to a ARGB one.

Parameters:
cThe premultiplied color.
Returns:
the ARGB color.

This function transforms the premultiplied color c to an ARGB one.

Transform the given ARGB color to a premultiplied one.

Parameters:
argbThe ARGB color.
Returns:
the premultiplied color.

This function transforms the argb color to a premultiplied one.

EAPI Enesim_Color enesim_color_components_from ( uint8_t  a,
uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Return a premultiplied color from the given components.

Parameters:
[in]aThe alpha component.
[in]rThe red component.
[in]gThe green component.
[in]bThe blue component.
Returns:
The Enesim color.

This function returns the premultiplied color with the components a, r, g and b.

See also:
enesim_color_components_to()
EAPI void enesim_color_components_to ( Enesim_Color  color,
uint8_t *  a,
uint8_t *  r,
uint8_t *  g,
uint8_t *  b 
)

Retrieve the component of the given premultiplied color.

Parameters:
[in]colorThe Enesim color to set.
[out]aThe alpha component.
[out]rThe red component.
[out]gThe green component.
[out]bThe blue component.

This function retrieves the ARGB components of the premultiplied color color and stores them into a, r, g and b.

See also:
enesim_color_components_from()
 All Data Structures Variables