imgLoadSvgIo function

Pointer<SdlSurface> imgLoadSvgIo(
  1. Pointer<SdlIoStream> src
)

Load a SVG image directly.

If you know you definitely have a SVG image, you can call this function, which will skip SDL_image's file format detection routines. Generally it's better to use the abstract interfaces; also, there is only an SDL_IOStream interface available here.

\param src an SDL_IOStream to load image data from. \returns SDL surface, or NULL on error.

\since This function is available since SDL_image 3.0.0.

\sa IMG_LoadAVIF_IO \sa IMG_LoadICO_IO \sa IMG_LoadCUR_IO \sa IMG_LoadBMP_IO \sa IMG_LoadGIF_IO \sa IMG_LoadJPG_IO \sa IMG_LoadJXL_IO \sa IMG_LoadLBM_IO \sa IMG_LoadPCX_IO \sa IMG_LoadPNG_IO \sa IMG_LoadPNM_IO \sa IMG_LoadQOI_IO \sa IMG_LoadTGA_IO \sa IMG_LoadTIF_IO \sa IMG_LoadXCF_IO \sa IMG_LoadXPM_IO \sa IMG_LoadXV_IO \sa IMG_LoadWEBP_IO

extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadSVG_IO(SDL_IOStream *src)

Implementation

Pointer<SdlSurface> imgLoadSvgIo(Pointer<SdlIoStream> src) {
  final imgLoadSvgIoLookupFunction = libSdl3Image.lookupFunction<
      Pointer<SdlSurface> Function(Pointer<SdlIoStream> src),
      Pointer<SdlSurface> Function(Pointer<SdlIoStream> src)>('IMG_LoadSVG_IO');
  return imgLoadSvgIoLookupFunction(src);
}