SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL3pp_image.h
1#ifndef SDL3PP_IMAGE_H_
2#define SDL3PP_IMAGE_H_
3
4#include "SDL3pp_error.h"
5#include "SDL3pp_render.h"
6#include "SDL3pp_surface.h"
7#include "SDL3pp_version.h"
8#include "SDL3pp_video.h"
9
10#if !defined(SDL3PP_DISABLE_IMAGE) && !defined(SDL3PP_ENABLE_IMAGE) && \
11 __has_include(<SDL3_image/SDL_image.h>)
12#define SDL3PP_ENABLE_IMAGE
13#endif
14
15#if defined(SDL3PP_ENABLE_IMAGE) || defined(SDL3PP_DOC)
16
17#include <SDL3_image/SDL_image.h>
18
19namespace SDL {
20
31// Forward decl
32struct Animation;
33
35using AnimationRaw = IMG_Animation*;
36
37// Forward decl
38struct AnimationRef;
39
42{
44
47 : value(value)
48 {
49 }
50
52 constexpr AnimationParam(std::nullptr_t _ = nullptr)
53 : value(nullptr)
54 {
55 }
56
58 constexpr explicit operator bool() const { return !!value; }
59
61 constexpr auto operator<=>(const AnimationParam& other) const = default;
62
64 constexpr operator AnimationRaw() const { return value; }
65
67 constexpr auto operator->() { return value; }
68};
69
72{
74
77 : value(value)
78 {
79 }
80
84 {
85 }
86
88 constexpr AnimationConstParam(std::nullptr_t _ = nullptr)
89 : value(nullptr)
90 {
91 }
92
94 constexpr explicit operator bool() const { return !!value; }
95
97 constexpr auto operator<=>(const AnimationConstParam& other) const = default;
98
100 constexpr operator const AnimationRaw() const { return value; }
101
103 constexpr auto operator->() { return value; }
104};
105
106#ifdef SDL3PP_DOC
107
113#define SDL_IMAGE_MAJOR_VERSION
114
115#define SDL_IMAGE_MINOR_VERSION
116
117#define SDL_IMAGE_MICRO_VERSION
118
120
124#define SDL_IMAGE_VERSION \
125 SDL_VERSIONNUM( \
126 SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_MICRO_VERSION)
127
129#define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
130 ((SDL_IMAGE_MAJOR_VERSION >= X) && \
131 (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION >= Y) && \
132 (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION > Y || \
133 SDL_IMAGE_MICRO_VERSION >= Z))
134
135#endif // SDL3PP_DOC
136
137namespace IMG {
138
146inline int Version() { return IMG_Version(); }
147
148} // namespace IMG
149
205 StringParam type,
206 bool closeio = false)
207{
208 return Surface(IMG_LoadTyped_IO(src, closeio, type));
209}
210
246inline Surface LoadSurface(StringParam file) { return Surface(IMG_Load(file)); }
247
294inline Surface LoadSurface(IOStreamParam src, bool closeio = false)
295{
296 return Surface(IMG_Load_IO(src, closeio));
297}
298
300 : m_resource(IMG_Load(file))
301{
302}
303
304inline Surface::Surface(IOStreamParam src, bool closeio)
305 : m_resource(IMG_Load_IO(src, closeio))
306{
307}
308
338{
339 return Texture(IMG_LoadTexture(renderer, file));
340}
341
383 IOStreamParam src,
384 bool closeio = false)
385{
386 return Texture(IMG_LoadTexture_IO(renderer, src, closeio));
387}
388
390 : m_resource(IMG_LoadTexture(renderer, file))
391{
392}
393
394inline Texture::Texture(RendererParam renderer, IOStreamParam src, bool closeio)
395 : m_resource(IMG_LoadTexture_IO(renderer, src, closeio))
396{
397}
398
447 IOStreamParam src,
448 StringParam type,
449 bool closeio = false)
450{
451 return Texture(IMG_LoadTextureTyped_IO(renderer, src, closeio, type));
452}
453
495inline bool isAVIF(IOStreamParam src) { return IMG_isAVIF(src); }
496
537inline bool isICO(IOStreamParam src) { return IMG_isICO(src); }
538
579inline bool isCUR(IOStreamParam src) { return IMG_isCUR(src); }
580
621inline bool isBMP(IOStreamParam src) { return IMG_isBMP(src); }
622
663inline bool isGIF(IOStreamParam src) { return IMG_isGIF(src); }
664
705inline bool isJPG(IOStreamParam src) { return IMG_isJPG(src); }
706
747inline bool isJXL(IOStreamParam src) { return IMG_isJXL(src); }
748
789inline bool isLBM(IOStreamParam src) { return IMG_isLBM(src); }
790
831inline bool isPCX(IOStreamParam src) { return IMG_isPCX(src); }
832
873inline bool isPNG(IOStreamParam src) { return IMG_isPNG(src); }
874
915inline bool isPNM(IOStreamParam src) { return IMG_isPNM(src); }
916
957inline bool isSVG(IOStreamParam src) { return IMG_isSVG(src); }
958
999inline bool isQOI(IOStreamParam src) { return IMG_isQOI(src); }
1000
1041inline bool isTIF(IOStreamParam src) { return IMG_isTIF(src); }
1042
1083inline bool isXCF(IOStreamParam src) { return IMG_isXCF(src); }
1084
1125inline bool isXPM(IOStreamParam src) { return IMG_isXPM(src); }
1126
1167inline bool isXV(IOStreamParam src) { return IMG_isXV(src); }
1168
1209inline bool isWEBP(IOStreamParam src) { return IMG_isWEBP(src); }
1210
1244{
1245 return Surface(IMG_LoadAVIF_IO(src));
1246}
1247
1281{
1282 return Surface{IMG_LoadICO_IO(src)};
1283}
1284
1318{
1319 return Surface{IMG_LoadCUR_IO(src)};
1320}
1321
1355{
1356 return Surface{IMG_LoadBMP_IO(src)};
1357}
1358
1392{
1393 return Surface{IMG_LoadGIF_IO(src)};
1394}
1395
1429{
1430 return Surface{IMG_LoadJPG_IO(src)};
1431}
1432
1466{
1467 return Surface{IMG_LoadJXL_IO(src)};
1468}
1469
1503{
1504 return Surface{IMG_LoadLBM_IO(src)};
1505}
1506
1540{
1541 return Surface{IMG_LoadPCX_IO(src)};
1542}
1543
1577{
1578 return Surface{IMG_LoadPNG_IO(src)};
1579}
1580
1614{
1615 return Surface{IMG_LoadPNM_IO(src)};
1616}
1617
1651{
1652 return Surface{IMG_LoadSVG_IO(src)};
1653}
1654
1688{
1689 return Surface{IMG_LoadQOI_IO(src)};
1690}
1691
1725{
1726 return Surface{IMG_LoadTGA_IO(src)};
1727}
1728
1762{
1763 return Surface{IMG_LoadTIF_IO(src)};
1764}
1765
1799{
1800 return Surface{IMG_LoadXCF_IO(src)};
1801}
1802
1836{
1837 return Surface{IMG_LoadXPM_IO(src)};
1838}
1839
1872inline Surface LoadXV(IOStreamParam src) { return Surface{IMG_LoadXV_IO(src)}; }
1873
1907{
1908 return Surface{IMG_LoadWEBP_IO(src)};
1909}
1910
1927{
1928 return Surface(IMG_LoadSizedSVG_IO(src, size.x, size.y));
1929}
1930
1945inline Surface ReadXPMFromArray(char** xpm)
1946{
1947 return Surface{IMG_ReadXPMFromArray(xpm)};
1948}
1949
1964{
1965 return Surface{IMG_ReadXPMFromArrayToRGB888(xpm)};
1966}
1967
1981inline void SaveAVIF(SurfaceParam surface, StringParam file, int quality)
1982{
1983 CheckError(IMG_SaveAVIF(surface, file, quality));
1984}
1985
2004inline void SaveAVIF(SurfaceParam surface,
2005 IOStreamParam dst,
2006 int quality,
2007 bool closeio = false)
2008{
2009 CheckError(IMG_SaveAVIF_IO(surface, dst, closeio, quality));
2010}
2011
2025inline void SavePNG(SurfaceParam surface, StringParam file)
2026{
2027 CheckError(IMG_SavePNG(surface, file));
2028}
2029
2046inline void SavePNG(SurfaceParam surface,
2047 IOStreamParam dst,
2048 bool closeio = false)
2049{
2050 CheckError(IMG_SavePNG_IO(surface, dst, closeio));
2051}
2052
2066inline void SaveJPG(SurfaceParam surface, StringParam file, int quality)
2067{
2068 CheckError(IMG_SaveJPG(surface, file, quality));
2069}
2070
2089inline void SaveJPG(SurfaceParam surface,
2090 IOStreamParam dst,
2091 int quality,
2092 bool closeio = false)
2093{
2094 CheckError(IMG_SaveJPG_IO(surface, dst, closeio, quality));
2095}
2096
2105{
2106 AnimationRaw m_resource = nullptr;
2107
2108public:
2110 constexpr Animation() = default;
2111
2119 constexpr explicit Animation(const AnimationRaw resource)
2120 : m_resource(resource)
2121 {
2122 }
2123
2125 constexpr Animation(const Animation& other) = delete;
2126
2128 constexpr Animation(Animation&& other)
2129 : Animation(other.release())
2130 {
2131 }
2132
2133 constexpr Animation(const AnimationRef& other) = delete;
2134
2135 constexpr Animation(AnimationRef&& other) = delete;
2136
2151 : m_resource(IMG_LoadAnimation(file))
2152 {
2153 }
2154
2174 Animation(IOStreamParam src, bool closeio = false)
2175 : m_resource(IMG_LoadAnimation_IO(src, closeio))
2176 {
2177 }
2178
2180 constexpr const AnimationRaw operator->() const { return m_resource; }
2181
2183 constexpr AnimationRaw operator->() { return m_resource; }
2184
2186 ~Animation() { IMG_FreeAnimation(m_resource); }
2187
2190 {
2191 std::swap(m_resource, other.m_resource);
2192 return *this;
2193 }
2194
2196 constexpr AnimationRaw get() const { return m_resource; }
2197
2200 {
2201 auto r = m_resource;
2202 m_resource = nullptr;
2203 return r;
2204 }
2205
2207 constexpr auto operator<=>(const Animation& other) const = default;
2208
2210 constexpr bool operator==(std::nullptr_t _) const { return !m_resource; }
2211
2213 constexpr explicit operator bool() const { return !!m_resource; }
2214
2216 constexpr operator AnimationParam() const { return {m_resource}; }
2217
2228 void Free();
2229
2231 int GetWidth() const;
2232
2234 int GetHeight() const;
2235
2237 Point GetSize() const;
2238
2240 int GetCount() const;
2241
2247 Surface GetFrame(int index) const;
2248
2254 int GetDelay(int index) const;
2255};
2256
2259{
2268 : Animation(resource.value)
2269 {
2270 }
2271
2274 : Animation(other.get())
2275 {
2276 }
2277
2280};
2281
2283inline int GetAnimationWidth(AnimationConstParam anim) { return anim->w; }
2284
2285inline int Animation::GetWidth() const
2286{
2287 return SDL::GetAnimationWidth(m_resource);
2288}
2289
2291inline int GetAnimationHeight(AnimationConstParam anim) { return anim->h; }
2292
2293inline int Animation::GetHeight() const
2294{
2295 return SDL::GetAnimationHeight(m_resource);
2296}
2297
2300{
2301 return {anim->w, anim->h};
2302}
2303
2305{
2306 return SDL::GetAnimationSize(m_resource);
2307}
2308
2310inline int GetAnimationCount(AnimationConstParam anim) { return anim->count; }
2311
2312inline int Animation::GetCount() const
2313{
2314 return SDL::GetAnimationCount(m_resource);
2315}
2316
2324{
2325 return Surface::Borrow(anim->frames[index]);
2326}
2327
2328inline Surface Animation::GetFrame(int index) const
2329{
2330 return SDL::GetAnimationFrame(m_resource, index);
2331}
2332
2339inline int GetAnimationDelay(AnimationConstParam anim, int index)
2340{
2341 return anim->delays[index];
2342}
2343
2344inline int Animation::GetDelay(int index) const
2345{
2346 return SDL::GetAnimationDelay(m_resource, index);
2347}
2348
2363{
2364 return Animation(std::move(file));
2365}
2366
2386inline Animation LoadAnimation(IOStreamParam src, bool closeio = false)
2387{
2388 return Animation(src, closeio);
2389}
2390
2419 StringParam type,
2420 bool closeio = false)
2421{
2422 return Animation(IMG_LoadAnimationTyped_IO(src, closeio, type));
2423}
2424
2437inline void FreeAnimation(AnimationRaw anim) { IMG_FreeAnimation(anim); }
2438
2440
2459{
2460 return Animation(IMG_LoadGIFAnimation_IO(src));
2461}
2462
2481{
2482 return Animation{IMG_LoadWEBPAnimation_IO(src)};
2483}
2484
2486
2487} // namespace SDL
2488
2489#endif // defined(SDL3PP_ENABLE_IMAGE) || defined(SDL3PP_DOC)
2490
2491#endif /* SDL3PP_IMAGE_H_ */
Animated image support.
Definition: SDL3pp_image.h:2105
constexpr AnimationRaw get() const
Retrieves underlying AnimationRaw.
Definition: SDL3pp_image.h:2196
constexpr Animation(Animation &&other)
Move constructor.
Definition: SDL3pp_image.h:2128
constexpr Animation(const AnimationRaw resource)
Constructs from AnimationParam.
Definition: SDL3pp_image.h:2119
~Animation()
Destructor.
Definition: SDL3pp_image.h:2186
constexpr AnimationRaw operator->()
member access to underlying AnimationRaw.
Definition: SDL3pp_image.h:2183
constexpr bool operator==(std::nullptr_t _) const
Comparison.
Definition: SDL3pp_image.h:2210
Animation(IOStreamParam src, bool closeio=false)
Load an animation from an IOStream.
Definition: SDL3pp_image.h:2174
constexpr Animation()=default
Default ctor.
constexpr const AnimationRaw operator->() const
member access to underlying AnimationRaw.
Definition: SDL3pp_image.h:2180
constexpr auto operator<=>(const Animation &other) const =default
Comparison.
constexpr AnimationRaw release()
Retrieves underlying AnimationRaw and clear this.
Definition: SDL3pp_image.h:2199
constexpr Animation(const Animation &other)=delete
Copy constructor.
Animation & operator=(Animation other)
Assignment operator.
Definition: SDL3pp_image.h:2189
Animation(StringParam file)
Load an animation from a file.
Definition: SDL3pp_image.h:2150
Helpers to use C++ strings parameters.
Definition: SDL3pp_strings.h:43
A collection of pixels used in software blitting.
Definition: SDL3pp_surface.h:201
constexpr Surface()=default
Default ctor.
static constexpr Surface Borrow(SurfaceParam resource)
Safely borrows the from SurfaceParam.
Definition: SDL3pp_surface.h:378
An efficient driver-specific representation of pixel data.
Definition: SDL3pp_render.h:2136
constexpr Texture()=default
Default ctor.
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition: SDL3pp_error.h:197
SDL_Point PointRaw
Alias to raw representation for Point.
Definition: SDL3pp_rect.h:22
Surface ReadXPMFromArrayToRGB888(char **xpm)
Load an XPM image from a memory array.
Definition: SDL3pp_image.h:1963
bool isTIF(IOStreamParam src)
Detect TIFF image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:1041
int GetWidth() const
Get the width in pixels.
Definition: SDL3pp_image.h:2285
Surface ReadXPMFromArray(char **xpm)
Load an XPM image from a memory array.
Definition: SDL3pp_image.h:1945
Surface LoadCUR(IOStreamParam src)
Load a CUR image directly.
Definition: SDL3pp_image.h:1317
void FreeAnimation(AnimationRaw anim)
Dispose of an Animation and free its resources.
Definition: SDL3pp_image.h:2437
Surface LoadSVG(IOStreamParam src)
Load a SVG image directly.
Definition: SDL3pp_image.h:1650
int GetHeight() const
Get the height in pixels.
Definition: SDL3pp_image.h:2293
bool isXCF(IOStreamParam src)
Detect XCF image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:1083
Surface LoadPCX(IOStreamParam src)
Load a PCX image directly.
Definition: SDL3pp_image.h:1539
Surface LoadLBM(IOStreamParam src)
Load a LBM image directly.
Definition: SDL3pp_image.h:1502
bool isQOI(IOStreamParam src)
Detect QOI image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:999
bool isJPG(IOStreamParam src)
Detect JPG image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:705
Surface LoadXV(IOStreamParam src)
Load a XV image directly.
Definition: SDL3pp_image.h:1872
bool isXPM(IOStreamParam src)
Detect XPM image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:1125
bool isGIF(IOStreamParam src)
Detect GIF image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:663
int GetDelay(int index) const
Return the frame delay under given index.
Definition: SDL3pp_image.h:2344
Surface LoadBMP(IOStreamParam src)
Load a BMP image directly.
Definition: SDL3pp_image.h:1354
Animation LoadWEBPAnimation(IOStreamParam src)
Load a WEBP animation directly.
Definition: SDL3pp_image.h:2480
void SaveJPG(SurfaceParam surface, StringParam file, int quality)
Save an Surface into a JPEG image file.
Definition: SDL3pp_image.h:2066
Surface LoadWEBP(IOStreamParam src)
Load a WEBP image directly.
Definition: SDL3pp_image.h:1906
Surface LoadSurfaceTyped(IOStreamParam src, StringParam type, bool closeio=false)
Load an image from an SDL data source into a software surface.
Definition: SDL3pp_image.h:204
Surface LoadTIF(IOStreamParam src)
Load a TIFF image directly.
Definition: SDL3pp_image.h:1761
Surface LoadJPG(IOStreamParam src)
Load a JPG image directly.
Definition: SDL3pp_image.h:1428
Surface LoadPNM(IOStreamParam src)
Load a PNM image directly.
Definition: SDL3pp_image.h:1613
bool isPCX(IOStreamParam src)
Detect PCX image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:831
Animation LoadAnimation(StringParam file)
Load an animation from a file.
Definition: SDL3pp_image.h:2362
bool isICO(IOStreamParam src)
Detect ICO image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:537
Animation LoadAnimationTyped(IOStreamParam src, StringParam type, bool closeio=false)
Load an animation from an SDL datasource.
Definition: SDL3pp_image.h:2418
int GetAnimationDelay(AnimationConstParam anim, int index)
Return the frame delay under given index.
Definition: SDL3pp_image.h:2339
Surface LoadTGA(IOStreamParam src)
Load a TGA image directly.
Definition: SDL3pp_image.h:1724
void Free()
Dispose of an Animation and free its resources.
Definition: SDL3pp_image.h:2439
Texture LoadTextureTyped(RendererParam renderer, IOStreamParam src, StringParam type, bool closeio=false)
Load an image from an SDL data source into a GPU texture.
Definition: SDL3pp_image.h:446
bool isJXL(IOStreamParam src)
Detect JXL image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:747
bool isWEBP(IOStreamParam src)
Detect WEBP image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:1209
bool isPNM(IOStreamParam src)
Detect PNM image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:915
bool isSVG(IOStreamParam src)
Detect SVG image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:957
Point GetAnimationSize(AnimationConstParam anim)
Get the size in pixels.
Definition: SDL3pp_image.h:2299
Surface LoadGIF(IOStreamParam src)
Load a GIF image directly.
Definition: SDL3pp_image.h:1391
Surface LoadJXL(IOStreamParam src)
Load a JXL image directly.
Definition: SDL3pp_image.h:1465
bool isAVIF(IOStreamParam src)
Detect AVIF image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:495
void SaveAVIF(SurfaceParam surface, StringParam file, int quality)
Save an Surface into a AVIF image file.
Definition: SDL3pp_image.h:1981
bool isLBM(IOStreamParam src)
Detect LBM image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:789
Surface GetFrame(int index) const
Return the frame image under given index.
Definition: SDL3pp_image.h:2328
Surface LoadICO(IOStreamParam src)
Load a ICO image directly.
Definition: SDL3pp_image.h:1280
bool isPNG(IOStreamParam src)
Detect PNG image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:873
Surface LoadAVIF(IOStreamParam src)
Load a AVIF image directly.
Definition: SDL3pp_image.h:1243
Surface LoadXPM(IOStreamParam src)
Load a XPM image directly.
Definition: SDL3pp_image.h:1835
Surface LoadPNG(IOStreamParam src)
Load a PNG image directly.
Definition: SDL3pp_image.h:1576
Surface LoadSizedSVG(IOStreamParam src, const PointRaw &size)
Load an SVG image, scaled to a specific size.
Definition: SDL3pp_image.h:1926
Animation LoadGIFAnimation(IOStreamParam src)
Load a GIF animation directly.
Definition: SDL3pp_image.h:2458
int GetCount() const
Return the number of frames.
Definition: SDL3pp_image.h:2312
bool isXV(IOStreamParam src)
Detect XV image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:1167
Surface GetAnimationFrame(AnimationConstParam anim, int index)
Return the frame image under given index.
Definition: SDL3pp_image.h:2323
Surface LoadQOI(IOStreamParam src)
Load a QOI image directly.
Definition: SDL3pp_image.h:1687
Texture LoadTexture(RendererParam renderer, StringParam file)
Load an image from a filesystem path into a GPU texture.
Definition: SDL3pp_image.h:337
int GetAnimationCount(AnimationConstParam anim)
Return the number of frames.
Definition: SDL3pp_image.h:2310
int GetAnimationWidth(AnimationConstParam anim)
Get the width in pixels.
Definition: SDL3pp_image.h:2283
Surface LoadXCF(IOStreamParam src)
Load a XCF image directly.
Definition: SDL3pp_image.h:1798
IMG_Animation * AnimationRaw
Alias to raw representation for Animation.
Definition: SDL3pp_image.h:35
int GetAnimationHeight(AnimationConstParam anim)
Get the height in pixels.
Definition: SDL3pp_image.h:2291
Surface LoadSurface(StringParam file)
Load an image from a filesystem path into a software surface.
Definition: SDL3pp_image.h:246
void SavePNG(SurfaceParam surface, StringParam file)
Save an Surface into a PNG image file.
Definition: SDL3pp_image.h:2025
bool isBMP(IOStreamParam src)
Detect BMP image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:621
bool isCUR(IOStreamParam src)
Detect CUR image data on a readable/seekable IOStream.
Definition: SDL3pp_image.h:579
Point GetSize() const
Get the size in pixels.
Definition: SDL3pp_image.h:2304
Main include header for the SDL3pp library.
Safely wrap Animation for non owning const parameters.
Definition: SDL3pp_image.h:72
constexpr AnimationConstParam(std::nullptr_t _=nullptr)
Constructs null/invalid.
Definition: SDL3pp_image.h:88
constexpr auto operator->()
member access to underlying AnimationRaw.
Definition: SDL3pp_image.h:103
const AnimationRaw value
parameter's const AnimationRaw
Definition: SDL3pp_image.h:73
constexpr auto operator<=>(const AnimationConstParam &other) const =default
Comparison.
constexpr AnimationConstParam(const AnimationRaw value)
Constructs from const AnimationRaw.
Definition: SDL3pp_image.h:76
constexpr AnimationConstParam(AnimationParam value)
Constructs from AnimationParam.
Definition: SDL3pp_image.h:82
Safely wrap Animation for non owning parameters.
Definition: SDL3pp_image.h:42
AnimationRaw value
parameter's AnimationRaw
Definition: SDL3pp_image.h:43
constexpr AnimationParam(std::nullptr_t _=nullptr)
Constructs null/invalid.
Definition: SDL3pp_image.h:52
constexpr AnimationParam(AnimationRaw value)
Constructs from AnimationRaw.
Definition: SDL3pp_image.h:46
constexpr auto operator<=>(const AnimationParam &other) const =default
Comparison.
constexpr auto operator->()
member access to underlying AnimationRaw.
Definition: SDL3pp_image.h:67
Semi-safe reference for Animation.
Definition: SDL3pp_image.h:2259
~AnimationRef()
Destructor.
Definition: SDL3pp_image.h:2279
AnimationRef(AnimationParam resource)
Constructs from AnimationParam.
Definition: SDL3pp_image.h:2267
AnimationRef(const AnimationRef &other)
Copy constructor.
Definition: SDL3pp_image.h:2273
Safely wrap IOStream for non owning parameters.
Definition: SDL3pp_iostream.h:34
The structure that defines a point (using integers).
Definition: SDL3pp_rect.h:83
Safely wrap Renderer for non owning parameters.
Definition: SDL3pp_render.h:53
Safely wrap Surface for non owning parameters.
Definition: SDL3pp_surface.h:46