|
SDL3pp
A slim C++ wrapper for SDL3
|
Base class to Animation. More...
Public Member Functions | |
| constexpr | operator AnimationConstRef () const noexcept |
| Converts to AnimationConstRef. | |
| void | Free () |
| Dispose of an Animation and free its resources. | |
| 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. | |
| int | GetDelay (int index) const |
| Return the frame delay under given index. | |
| void | Save (StringParam file) |
| Save an animation to a file. | |
| void | SaveTyped_IO (IOStreamRef dst, StringParam type, bool closeio=false) |
| Save an animation to an IOStream. | |
| void | SaveANI_IO (IOStreamRef dst, bool closeio=false) |
| Save an animation in ANI format to an IOStream. | |
| void | SaveAPNG_IO (IOStreamRef dst, bool closeio=false) |
| Save an animation in APNG format to an IOStream. | |
| void | SaveAVIF_IO (IOStreamRef dst, int quality, bool closeio=false) |
| Save an animation in AVIF format to an IOStream. | |
| void | SaveGIF_IO (IOStreamRef dst, bool closeio=false) |
| Save an animation in GIF format to an IOStream. | |
| void | SaveWEBP_IO (IOStreamRef dst, int quality, bool closeio=false) |
| Save an animation in WEBP format to an IOStream. | |
| Cursor | CreateCursor (const PointRaw &hotspot) |
| Create an animated cursor from an animation. | |
| constexpr | ResourceBaseT ()=default |
| Default constructor, creates null/invalid resource. | |
| constexpr | ResourceBaseT (RawPointer resource) |
| Constructs from resource pointer. | |
| constexpr | ResourceBaseT (std::nullptr_t) |
| Constructs null/invalid. | |
| constexpr | ResourceBaseT (const ResourceBaseT &)=default |
| Copy constructor. | |
| constexpr | ResourceBaseT (ResourceBaseT &&) noexcept=default |
| Move constructor. | |
| Public Member Functions inherited from SDL::ResourceBaseT< AnimationRaw, AnimationRawConst > | |
| constexpr | ResourceBaseT ()=default |
| Default constructor, creates null/invalid resource. | |
| constexpr | operator bool () const |
| Converts to bool. | |
| constexpr auto | operator<=> (const ResourceBaseT &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. | |
Additional Inherited Members | |
| Public Types inherited from SDL::ResourceBaseT< AnimationRaw, AnimationRawConst > | |
| using | RawPointer |
| The underlying raw pointer type. | |
| using | RawConstPointer |
| The underlying const raw pointer type. | |
| Protected Member Functions inherited from SDL::ResourceBaseT< AnimationRaw, AnimationRawConst > | |
| constexpr | ~ResourceBaseT ()=default |
| Destructor. | |
| constexpr ResourceBaseT & | operator= (const ResourceBaseT &)=default |
| Assignment operator. | |