OpenTTD Source 20250205-master-gfd85ab1e2c
|
Packed colour union to access the alpha, red, green, and blue channels from a 32 bit number for little-endian systems. More...
#include <gfx_type.h>
Public Member Functions | |
constexpr | ColourBGRA (uint8_t r, uint8_t g, uint8_t b, uint8_t a=0xFF) |
Create a new colour. | |
constexpr | ColourBGRA (uint data=0) |
Create a new colour. | |
Data Fields | ||
uint32_t | data | |
Conversion of the channel information to a 32 bit number. | ||
struct { | ||
uint8_t b | ||
uint8_t g | ||
uint8_t r | ||
uint8_t a | ||
colour channels in LE order More... | ||
}; | ||
Packed colour union to access the alpha, red, green, and blue channels from a 32 bit number for little-endian systems.
Definition at line 210 of file gfx_type.h.
|
inlineconstexpr |
Create a new colour.
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 223 of file gfx_type.h.
|
inlineconstexpr |
Create a new colour.
data | The colour in the correct packed format. |
Definition at line 229 of file gfx_type.h.
uint8_t ColourBGRA::a |
colour channels in LE order
Definition at line 213 of file gfx_type.h.
uint8_t ColourBGRA::b |
Definition at line 213 of file gfx_type.h.
uint32_t ColourBGRA::data |
Conversion of the channel information to a 32 bit number.
Definition at line 211 of file gfx_type.h.
uint8_t ColourBGRA::g |
Definition at line 213 of file gfx_type.h.
uint8_t ColourBGRA::r |
Definition at line 213 of file gfx_type.h.