A structure that represents a color as RGBA components.
More...
The bits of this structure can be directly reinterpreted as an integer-packed color which uses the PIXELFORMAT_RGBA32 format (PIXELFORMAT_ABGR8888 on little-endian systems and PIXELFORMAT_RGBA8888 on big-endian systems).
- Since
- This struct is available since SDL 3.2.0.
- Category:
- Wrap extending struct
- See also
- FColor
◆ Color() [1/2]
| constexpr SDL::Color::Color |
( |
ColorRaw |
color = {} | ) |
|
|
inlineconstexpr |
- Parameters
-
| color | the value to be wrapped |
◆ Color() [2/2]
- Parameters
-
| r | the value for channel r. |
| g | the value for channel g. |
| b | the value for channel b. |
| a | the value for channel a. |
◆ GetA()
| constexpr Uint8 SDL::Color::GetA |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- The alpha component from the color.
◆ GetB()
| constexpr Uint8 SDL::Color::GetB |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- The blue component from the color.
◆ GetG()
| constexpr Uint8 SDL::Color::GetG |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- The green component from the color.
◆ GetR()
| constexpr Uint8 SDL::Color::GetR |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- The red component from the color.
◆ SetA()
- Parameters
-
| newA | New alpha component value. |
- Returns
- Reference to self.
◆ SetB()
- Parameters
-
| newB | New blue component value. |
- Returns
- Reference to self.
◆ SetG()
- Parameters
-
| newG | New green component value. |
- Returns
- Reference to self.
◆ SetR()
- Parameters
-
| newR | New red component value. |
- Returns
- Reference to self.
The documentation for this struct was generated from the following file: