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

Semi-safe reference for Animation.

Inheritance diagram for SDL::AnimationRef:
Inheritance graph
[legend]
Collaboration diagram for SDL::AnimationRef:
Collaboration graph
[legend]

Public Member Functions

 AnimationRef (AnimationParam resource)
 Constructs from AnimationParam. More...
 
 AnimationRef (const AnimationRef &other)
 Copy constructor.
 
 ~AnimationRef ()
 Destructor.
 
- Public Member Functions inherited from SDL::Animation
constexpr Animation ()=default
 Default ctor.
 
constexpr Animation (const AnimationRaw resource)
 Constructs from AnimationParam. More...
 
constexpr Animation (const Animation &other)=delete
 Copy constructor.
 
constexpr Animation (Animation &&other)
 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...
 
 ~Animation ()
 Destructor.
 
Animationoperator= (Animation other)
 Assignment operator.
 
constexpr AnimationRaw get () const
 Retrieves underlying AnimationRaw.
 
constexpr AnimationRaw release ()
 Retrieves underlying AnimationRaw and clear this.
 
constexpr auto operator<=> (const Animation &other) const =default
 Comparison.
 
constexpr bool operator== (std::nullptr_t _) const
 Comparison.
 
constexpr operator bool () const
 Converts to bool.
 
constexpr operator AnimationParam () const
 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.
 
SurfaceRaw 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...
 

Constructor & Destructor Documentation

◆ AnimationRef()

SDL::AnimationRef::AnimationRef ( AnimationParam  resource)
inline
Parameters
resourcea AnimationRaw or Animation.

This does not takes ownership!


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