imgResetAnimationDecoder function image

bool imgResetAnimationDecoder(
  1. Pointer<ImgAnimationDecoder> decoder
)

Reset an animation decoder.

Calling this function resets the animation decoder, allowing it to start from the beginning again. This is useful if you want to decode the frame sequence again without creating a new decoder.

\param decoder the decoder to reset. \returns true on success or false on failure; call SDL_GetError() for more information.

\since This function is available since SDL_image 3.4.0.

\sa IMG_CreateAnimationDecoder \sa IMG_CreateAnimationDecoder_IO \sa IMG_CreateAnimationDecoderWithProperties \sa IMG_GetAnimationDecoderFrame \sa IMG_CloseAnimationDecoder

extern SDL_DECLSPEC bool SDLCALL IMG_ResetAnimationDecoder(IMG_AnimationDecoder *decoder)

Implementation

bool imgResetAnimationDecoder(Pointer<ImgAnimationDecoder> decoder) {
  final imgResetAnimationDecoderLookupFunction = _libImage
      .lookupFunction<
        Uint8 Function(Pointer<ImgAnimationDecoder> decoder),
        int Function(Pointer<ImgAnimationDecoder> decoder)
      >('IMG_ResetAnimationDecoder');
  return imgResetAnimationDecoderLookupFunction(decoder) == 1;
}