A set of indexed colors representing a palette.
More...
|
| constexpr | Palette (PaletteRaw resource) noexcept |
| | Constructs from raw Palette.
|
|
constexpr | Palette (const Palette &other) |
| | Copy constructor.
|
|
constexpr | Palette (Palette &&other) noexcept |
| | Move constructor.
|
| | Palette (int ncolors) |
| | Create a palette structure with the specified number of color entries.
|
|
constexpr | operator PaletteConstRef () const noexcept |
| | Converts to PaletteConstRef.
|
|
| ~Palette () |
| | Destructor.
|
|
constexpr Palette & | operator= (Palette &&other) noexcept |
| | Assignment operator.
|
|
Palette & | operator= (const Palette &other) |
| | Assignment operator.
|
| void | Destroy () |
| | Free a palette created with CreatePalette().
|
|
constexpr const ColorRaw * | data () const |
| | Access specific pallete colors.
|
|
constexpr int | size () const |
| | Returns number of colors in the palette.
|
|
constexpr ColorRaw | operator[] (int index) const |
| | Access specific pallete index.
|
|
constexpr PaletteIndex | operator[] (int index) |
| | Change specific pallete index.
|
| void | SetColors (SpanRef< const ColorRaw > colors, int firstcolor=0) |
| | Set a range of colors in a palette.
|
|
constexpr | ResourceBase (RawPointer resource) |
| | Constructs from resource pointer.
|
|
constexpr | ResourceBase (std::nullptr_t=nullptr) |
| | Constructs null/invalid.
|
|
constexpr | ResourceBase (RawPointer resource) |
| | Constructs from resource pointer.
|
|
constexpr | operator bool () const |
| | Converts to bool.
|
|
constexpr auto | operator<=> (const ResourceBase &other) const=default |
| | Comparison.
|
|
constexpr RawConstPointer | operator-> () const noexcept |
| | member access to underlying resource pointer.
|
|
constexpr RawPointer | get () const noexcept |
| | Retrieves underlying resource pointer.
|
|
constexpr RawPointer | release () noexcept |
| | Retrieves underlying resource pointer and clear this.
|
|
|
using | RawPointer |
| | The underlying raw pointer type.
|
|
using | RawConstPointer |
| | The underlying const raw pointer type.
|
A set of indexed colors representing a palette.
- Since
- This struct is available since SDL 3.2.0.
- See also
- Palette.SetColors
- Category:
- Resource
◆ Palette()
|
|
inlineexplicitconstexprnoexcept |
Constructs from raw Palette.
- Parameters
-
This assumes the ownership, call release() if you need to take back.
◆ Borrow()
Safely borrows the from PaletteRaw.
- Parameters
-
This does not takes ownership!
The documentation for this struct was generated from the following file: