SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members

Handle to an owned animation. More...

Inheritance diagram for SDL::Animation:
Inheritance graph
[legend]

Public Member Functions

constexpr Animation (IMG_Animation *resource={})
 Constructs from the underlying resource.
 
constexpr Animation (const Animation &other)=delete
 
constexpr Animation (Animation &&other)=default
 Move constructor.
 
 ~Animation ()
 Frees up resource when object goes out of scope.
 
Animationoperator= (Animation other)
 Assignment operator.
 
constexpr AnimationRef (const AnimationRef &other)
 Copy constructor.
 
constexpr AnimationRef (AnimationRef &&other)
 Move constructor.
 
- Public Member Functions inherited from SDL::AnimationRef
constexpr AnimationRef (const AnimationRef &other)
 Copy constructor.
 
constexpr AnimationRef (AnimationRef &&other)
 Move constructor.
 
constexpr ~AnimationRef ()=default
 Default constructor.
 
AnimationRefoperator= (AnimationRef other)
 Assignment operator.
 
void reset (IMG_Animation *newResource={})
 Dispose of an AnimationBase and free its resources.
 
 AnimationBase (StringParam file)
 Load an animation from a file.
 
 AnimationBase (IOStreamBase &src)
 Load an animation from an IOStreamBase.
 
 AnimationBase (IOStreamBase &src, StringParam type)
 Load an animation from an SDL datasource.
 
- Public Member Functions inherited from SDL::AnimationBase
 AnimationBase (StringParam file)
 Load an animation from a file.
 
 AnimationBase (IOStreamBase &src)
 Load an animation from an IOStreamBase.
 
 AnimationBase (IOStreamBase &src, StringParam type)
 Load an animation from an SDL datasource.
 
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.
 
SurfaceRef GetFrame (int index) const
 Return the frame image under given index.
 
int GetDelay (int index) const
 Return the frame delay under given index.
 
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
 
- Public Member Functions inherited from SDL::Resource< IMG_Animation * >
constexpr Resource (IMG_Animation * 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
 
Resourceoperator= (const Resource &other)=delete
 
Resourceoperator= (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 IMG_Animation * get () const
 Return contained resource;.
 
constexpr IMG_Animation * release (IMG_Animation * newResource={})
 Return contained resource and empties or replace value.
 
constexpr const IMG_Animation * operator-> () const
 Access to fields.
 
constexpr IMG_Animation * operator-> ()
 Access to fields.
 

Detailed Description

Category:
Resource
See also
AnimationBase
AnimationRef

The documentation for this struct was generated from the following file: