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


Public Member Functions | |
| AnimationEncoderRef (AnimationEncoderParam resource) noexcept | |
| Constructs from AnimationEncoderParam. More... | |
| AnimationEncoderRef (AnimationEncoderRaw resource) noexcept | |
| Constructs from AnimationEncoderParam. More... | |
| constexpr | AnimationEncoderRef (const AnimationEncoderRef &other) noexcept=default |
| Copy constructor. | |
| ~AnimationEncoderRef () | |
| Destructor. | |
| constexpr | AnimationEncoder (std::nullptr_t=nullptr) noexcept |
| Default ctor. | |
| constexpr | AnimationEncoder (const AnimationEncoderRaw resource) noexcept |
| Constructs from AnimationEncoderParam. More... | |
| constexpr | AnimationEncoder (const AnimationEncoder &other) noexcept=default |
| Copy constructor. | |
| constexpr | AnimationEncoder (AnimationEncoder &&other) noexcept |
| Move constructor. | |
| constexpr | AnimationEncoder (const AnimationEncoderRef &other)=delete |
| constexpr | AnimationEncoder (AnimationEncoderRef &&other)=delete |
| AnimationEncoder (StringParam file) | |
| Create an encoder to save a series of images to a file. More... | |
| AnimationEncoder (IOStreamParam dst, StringParam type, bool closeio=false) | |
| Create an encoder to save a series of images to an IOStream. More... | |
| AnimationEncoder (PropertiesParam props) | |
| Create an animation encoder with the specified properties. More... | |
Public Member Functions inherited from SDL::AnimationEncoder | |
| constexpr | AnimationEncoder (std::nullptr_t=nullptr) noexcept |
| Default ctor. | |
| constexpr | AnimationEncoder (const AnimationEncoderRaw resource) noexcept |
| Constructs from AnimationEncoderParam. More... | |
| constexpr | AnimationEncoder (AnimationEncoder &&other) noexcept |
| Move constructor. | |
| constexpr | AnimationEncoder (const AnimationEncoderRef &other)=delete |
| constexpr | AnimationEncoder (AnimationEncoderRef &&other)=delete |
| AnimationEncoder (StringParam file) | |
| Create an encoder to save a series of images to a file. More... | |
| AnimationEncoder (IOStreamParam dst, StringParam type, bool closeio=false) | |
| Create an encoder to save a series of images to an IOStream. More... | |
| AnimationEncoder (PropertiesParam props) | |
| Create an animation encoder with the specified properties. More... | |
| ~AnimationEncoder () | |
| Destructor. | |
| constexpr AnimationEncoder & | operator= (AnimationEncoder &&other) noexcept |
| Assignment operator. | |
| constexpr AnimationEncoderRaw | get () const noexcept |
| Retrieves underlying AnimationEncoderRaw. | |
| constexpr AnimationEncoderRaw | release () noexcept |
| Retrieves underlying AnimationEncoderRaw and clear this. | |
| constexpr auto | operator<=> (const AnimationEncoder &other) const noexcept=default |
| Comparison. | |
| constexpr | operator bool () const noexcept |
| Converts to bool. | |
| constexpr | operator AnimationEncoderParam () const noexcept |
| Converts to AnimationEncoderParam. | |
| void | Close () |
| Close an animation encoder, finishing any encoding. More... | |
| void | AddFrame (SurfaceParam surface, Uint64 duration) |
| Add a frame to an animation encoder. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SDL::AnimationEncoder | |
| constexpr | AnimationEncoder (const AnimationEncoder &other) noexcept=default |
| Copy constructor. | |
| constexpr AnimationEncoder & | operator= (const AnimationEncoder &other) noexcept=default |
| Assignment operator. | |
|
inlinenoexcept |
| resource | a AnimationEncoderRaw or AnimationEncoder. |
This does not takes ownership!
|
inlinenoexcept |
| resource | a AnimationEncoderRaw or AnimationEncoder. |
This does not takes ownership!
|
inlineexplicitconstexprnoexcept |
| resource | a AnimationEncoderRaw to be wrapped. |
This assumes the ownership, call release() if you need to take back.
|
inline |
These animation types are currently supported:
If closeio is true, dst will be closed before returning if this function fails, or when the animation encoder is closed if this function succeeds.
| dst | an IOStream that will be used to save the stream. |
| type | a filename extension that represent this data ("WEBP", etc). |
| closeio | true to close the IOStream when done, false to leave it open. |
|
inline |
These animation types are currently supported:
These are the supported properties:
prop::AnimationEncoder.CREATE_FILENAME_STRING: the file to save, if an IOStream isn't being used. This is required if prop::AnimationEncoder.CREATE_IOSTREAM_POINTER isn't set.prop::AnimationEncoder.CREATE_IOSTREAM_POINTER: an IOStream that will be used to save the stream. This should not be closed until the animation encoder is closed. This is required if prop::AnimationEncoder.CREATE_FILENAME_STRING isn't set.prop::AnimationEncoder.CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN: true if closing the animation encoder should also close the associated IOStream.prop::AnimationEncoder.CREATE_TYPE_STRING: the output file type, e.g. "webp", defaults to the file extension if prop::AnimationEncoder.CREATE_FILENAME_STRING is set.prop::AnimationEncoder.CREATE_QUALITY_NUMBER: the compression quality, in the range of 0 to 100. The higher the number, the higher the quality and file size. This defaults to a balanced value for compression and quality.prop::AnimationEncoder.CREATE_TIMEBASE_NUMERATOR_NUMBER: the numerator of the fraction used to multiply the pts to convert it to seconds. This defaults to 1.prop::AnimationEncoder.CREATE_TIMEBASE_DENOMINATOR_NUMBER: the denominator of the fraction used to multiply the pts to convert it to seconds. This defaults to 1000.| props | the properties of the animation encoder. |
|
inline |
These animation types are currently supported:
The file type is determined from the file extension, e.g. "file.webp" will be encoded using WEBP.
| file | the file where the animation will be saved. |