|
constexpr | PaletteRef (const PaletteRef &other) |
| Copy constructor.
|
|
constexpr | PaletteRef (PaletteRef &&other) |
| Move constructor.
|
|
constexpr | ~PaletteRef ()=default |
| Default constructor.
|
|
PaletteRef & | operator= (PaletteRef other) |
| Assignment operator.
|
|
void | reset (SDL_Palette *newResource={}) |
| Free a palette created with PaletteBase.PaletteBase().
|
|
| PaletteBase (int ncolors) |
| Create a palette structure with the specified number of color entries.
|
|
| PaletteBase (int ncolors) |
| Create a palette structure with the specified number of color entries.
|
|
constexpr int | GetSize () const |
| Return the number of colors.
|
|
constexpr Color | operator[] (int index) const |
| Get the index color.
|
|
void | SetColors (std::span< const SDL_Color > colors, int firstcolor=0) |
| Set a range of colors in a palette.
|
|
bool | SetColors (SpanRef< const SDL_Color > colors, int firstcolor=0) |
| Set a range of colors in a palette.
|
|
constexpr | Resource (T resource={}) |
| Constructs the underlying resource.
|
|
constexpr | Resource (std::nullptr_t) |
| Equivalent to default ctor.
|
|
constexpr | Resource (std::nullopt_t) |
| Equivalent to default ctor.
|
|
| Resource (const Resource &other)=delete |
|
| Resource (Resource &&other)=delete |
|
constexpr | Resource (SDL_Palette * resource={}) |
| Constructs the underlying resource.
|
|
constexpr | Resource (std::nullptr_t) |
| Equivalent to default ctor.
|
|
constexpr | Resource (std::nullopt_t) |
| Equivalent to default ctor.
|
|
| Resource (const Resource &other)=delete |
|
| Resource (Resource &&other)=delete |
|
Resource & | operator= (const Resource &other)=delete |
|
Resource & | operator= (Resource &&other)=delete |
|
constexpr | operator bool () const |
| True if contains a valid resource.
|
|
constexpr bool | operator== (const Resource &other) const=default |
| Comparison.
|
|
constexpr bool | operator== (std::nullopt_t) const |
| Comparison.
|
|
constexpr bool | operator== (std::nullptr_t) const |
| Comparison.
|
|
constexpr SDL_Palette * | get () const |
| Return contained resource;.
|
|
constexpr SDL_Palette * | release (SDL_Palette * newResource={}) |
| Return contained resource and empties or replace value.
|
|
constexpr const SDL_Palette * | operator-> () const |
| Access to fields.
|
|
constexpr SDL_Palette * | operator-> () |
| Access to fields.
|
|