sdl2 :: IMG :: defaultinit
# Holds the global methods of `sdl2::image`
class IMG
# Get the `IMG` singleton
new do return once new IMG.internal
# TODO make this private and only called through `sys.sdl.img`
init internal do end
# Initialize the image library
fun initialize(flags: SDLImgInitFlags): SDLImgInitFlags `{
return IMG_Init(flags);
`}
# Finalize and clean up the image library
fun quit `{ IMG_Quit(); `}
# Get the latest image library error
fun error: CString `{ return (char*)IMG_GetError(); `}
end
lib/sdl2/image.nit:37,1--55,3