|
SDL3pp
A slim C++ wrapper for SDL3
|
Semi-safe reference for Animation.


Public Member Functions | |
| AnimationRef (AnimationParam resource) noexcept | |
| Constructs from AnimationParam. More... | |
| AnimationRef (AnimationRaw resource) noexcept | |
| Constructs from AnimationParam. More... | |
| constexpr | AnimationRef (const AnimationRef &other) noexcept=default |
| Copy constructor. | |
| ~AnimationRef () | |
| Destructor. | |
| constexpr | Animation (std::nullptr_t=nullptr) noexcept |
| Default ctor. | |
| constexpr | Animation (const AnimationRaw resource) noexcept |
| Constructs from AnimationParam. More... | |
| constexpr | Animation (const Animation &other) noexcept=default |
| Copy constructor. | |
| constexpr | Animation (Animation &&other) noexcept |
| Move constructor. | |
| constexpr | Animation (const AnimationRef &other)=delete |
| constexpr | Animation (AnimationRef &&other)=delete |
| Animation (StringParam file) | |
| Load an animation from a file. More... | |
| Animation (IOStreamParam src, bool closeio=false) | |
| Load an animation from an IOStream. More... | |
Public Member Functions inherited from SDL::Animation | |
| constexpr | Animation (std::nullptr_t=nullptr) noexcept |
| Default ctor. | |
| constexpr | Animation (const AnimationRaw resource) noexcept |
| Constructs from AnimationParam. More... | |
| constexpr | Animation (Animation &&other) noexcept |
| Move constructor. | |
| constexpr | Animation (const AnimationRef &other)=delete |
| constexpr | Animation (AnimationRef &&other)=delete |
| Animation (StringParam file) | |
| Load an animation from a file. More... | |
| Animation (IOStreamParam src, bool closeio=false) | |
| Load an animation from an IOStream. More... | |
| constexpr const AnimationRaw | operator-> () const noexcept |
| member access to underlying AnimationRaw. | |
| constexpr AnimationRaw | operator-> () noexcept |
| member access to underlying AnimationRaw. | |
| ~Animation () | |
| Destructor. | |
| constexpr Animation & | operator= (Animation &&other) noexcept |
| Assignment operator. | |
| constexpr AnimationRaw | get () const noexcept |
| Retrieves underlying AnimationRaw. | |
| constexpr AnimationRaw | release () noexcept |
| Retrieves underlying AnimationRaw and clear this. | |
| constexpr auto | operator<=> (const Animation &other) const noexcept=default |
| Comparison. | |
| constexpr | operator bool () const noexcept |
| Converts to bool. | |
| constexpr | operator AnimationParam () const noexcept |
| Converts to AnimationParam. | |
| void | Free () |
| Dispose of an Animation and free its resources. More... | |
| int | GetWidth () const |
| Get the width in pixels. | |
| int | GetHeight () const |
| Get the height in pixels. | |
| Point | GetSize () const |
| Get the size in pixels. | |
| int | GetCount () const |
| Return the number of frames. | |
| Surface | GetFrame (int index) const |
| Return the frame image under given index. More... | |
| int | GetDelay (int index) const |
| Return the frame delay under given index. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SDL::Animation | |
| constexpr | Animation (const Animation &other) noexcept=default |
| Copy constructor. | |
| constexpr Animation & | operator= (const Animation &other) noexcept=default |
| Assignment operator. | |
|
inlinenoexcept |
| resource | a AnimationRaw or Animation. |
This does not takes ownership!
|
inlinenoexcept |
| resource | a AnimationRaw or Animation. |
This does not takes ownership!
|
inlineexplicitconstexprnoexcept |
| resource | a AnimationRaw to be wrapped. |
This assumes the ownership, call release() if you need to take back.
|
inline |
If closeio is true, src will be closed before returning, whether this function succeeds or not. SDL_image reads everything it needs from src during this call in any case.
When done with the returned animation, the app should dispose of it with a call to Animation.Free().
| src | an IOStream that data will be read from. |
| closeio | true to close/free the IOStream before returning, false to leave it open. |
|
inline |
When done with the returned animation, the app should dispose of it with a call to Animation.Free().
| file | path on the filesystem containing an animated image. |