Exemplo n.º 1
0
def loadPCX_RW(src):
    """
    ``SDL_Surface * IMG_LoadPCX_RW(SDL_RWops *)``
    """
    src_c = unbox(src, 'SDL_RWops *')
    rc = lib.IMG_LoadPCX_RW(src_c)
    if rc == ffi.NULL: raise SDLError()
    return SDL_Surface(rc)
Exemplo n.º 2
0
def load(file):
    """
    ``SDL_Surface * IMG_Load(char const *)``
    """
    file_c = u8(file)
    rc = lib.IMG_Load(file_c)
    if rc == ffi.NULL: raise SDLError()
    return SDL_Surface(rc)
Exemplo n.º 3
0
def readXPMFromArray(xpm):
    """
    ``SDL_Surface * IMG_ReadXPMFromArray(char * *)``
    """
    xpm_c = unbox(xpm, 'char * *')
    rc = lib.IMG_ReadXPMFromArray(xpm_c)
    if rc == ffi.NULL: raise SDLError()
    return SDL_Surface(rc)
Exemplo n.º 4
0
def load_RW(src, freesrc):
    """
    ``SDL_Surface * IMG_Load_RW(SDL_RWops *, int)``
    """
    src_c = unbox(src, 'SDL_RWops *')
    freesrc_c = freesrc
    rc = lib.IMG_Load_RW(src_c, freesrc_c)
    if rc == ffi.NULL: raise SDLError()
    return SDL_Surface(rc)
Exemplo n.º 5
0
def loadTyped_RW(src, freesrc, type):
    """
    ``SDL_Surface * IMG_LoadTyped_RW(SDL_RWops *, int, char const *)``
    """
    src_c = unbox(src, 'SDL_RWops *')
    freesrc_c = freesrc
    type_c = u8(type)
    rc = lib.IMG_LoadTyped_RW(src_c, freesrc_c, type_c)
    if rc == ffi.NULL: raise SDLError()
    return SDL_Surface(rc)