Пример #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
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
 def render_blended(self, text, color):
     return Surface._from_ptr(check_ptr_err(lib.TTF_RenderUTF8_Blended(self._ptr, text.encode('utf-8'), color)))