예제 #1
0
def load(file):
    """Load an image from a file name in a new surface. Type detected from file name.
    Args
        file: The name of the image file.

    Returns:
        A new surface.

    """
    return Surface._from_ptr(check_ptr_err(lib.IMG_Load(file)))
예제 #2
0
파일: image.py 프로젝트: jdoda/sdl2hl
def load(file):
    """Load an image from a file name in a new surface. Type detected from file name.
    Args
        file: The name of the image file.

    Returns:
        A new surface.

    """
    return Surface._from_ptr(check_ptr_err(lib.IMG_Load(file)))
예제 #3
0
파일: ttf.py 프로젝트: daniel--/sdl2hl
 def render_blended(self, text, color):
     return Surface._from_ptr(check_ptr_err(lib.TTF_RenderUTF8_Blended(self._ptr, text.encode('utf-8'), color)))