FastLED 3.9.15
Loading...
Searching...
No Matches

◆ nsgif_reset()

nsgif_error fl::third_party::nsgif_reset ( nsgif_t * gif)

Reset a GIF animation.

Some animations are only meant to loop N times, and then show the final frame forever. This function resets the loop and frame counters, so that the animation can be replayed without the overhead of recreating the nsgif_t object and rescanning the raw data.

Parameters
[in]gifA nsgif_t object.
Returns
NSGIF_OK on success, or appropriate error otherwise.

Definition at line 1872 of file gif.cpp.hpp.

1874{
1875 gif->loop_count = 0;
1877
1878 return NSGIF_OK;
1879}
@ NSGIF_OK
Success.
Definition nsgif.hpp:62
fl::u32 frame
current frame
Definition gif.cpp.hpp:81
int loop_count
number of animation loops so far
Definition gif.cpp.hpp:97
#define NSGIF_FRAME_INVALID
Internal flag that a frame is invalid/unprocessed.
Definition gif.cpp.hpp:162

References FL_NOEXCEPT, NSGIF_FRAME_INVALID, and NSGIF_OK.