Public Member Functions | Data Fields

# Colour Union Reference

Structure to access the alpha, red, green, and blue channels from a 32 bit number. More...

`#include <gfx_type.h>`

## Public Member Functions
| Colour (uint8 r, uint8 g, uint8 b, uint8 a=0xFF)
| Create a new colour.
| Colour (uint data=0)
| Create a new colour.
## Data Fields
uint32 | data
| Conversion of the channel information to a 32 bit number.
struct {
uint8 b
uint8 g
uint8 r
uint8 a
| colour channels in LE order
}; |

## Detailed Description

Structure to access the alpha, red, green, and blue channels from a 32 bit number.

Definition at line 152 of file gfx_type.h.

## Constructor & Destructor Documentation

Colour::Colour | ( | uint8 | r,
|  | uint8 | g,
|  | uint8 | b,
|  | uint8 | a = `0xFF` |
| ) |  |  | `[inline]`

Create a new colour.

Parameters:

  | r | The channel for the red colour.
  | g | The channel for the green colour.
  | b | The channel for the blue colour.
  | a | The channel for the alpha/transparency.

Definition at line 169 of file gfx_type.h.

Colour::Colour | ( | uint | data = `0` | ) | `[inline]`

Create a new colour.

Parameters:

  | The | colour in the correct packed format.

Definition at line 182 of file gfx_type.h.

The documentation for this union was generated from the following file:

- src/gfx_type.h