sdl2 :: SDLSurface :: defaultinit
# A bitmap surface
extern class SDLSurface `{ SDL_Surface * `}
# Load the BMP file at `path`
new load_bmp(path: CString) `{ return SDL_LoadBMP(path); `}
redef fun free `{ SDL_FreeSurface(self); `}
# Save this texture to a BMP file
fun save_bmp(path: CString) `{ SDL_SaveBMP(self, path); `}
# Format of the pixels
fun format: SDL_PixelFormat `{ return self->format; `}
# Width in pixels
fun w: Int `{ return self->w; `}
# Height in pixels
fun h: Int `{ return self->h; `}
# Bytes in a row of pixels
fun pitch: Int `{ return self->pitch; `}
# Pointer to pixel data
fun pixels: Pointer `{ return self->pixels; `}
end
lib/sdl2/sdl2_base.nit:397,1--422,3