Example #1
0
def make_surface(array):
    """pygame.surfarray.make_surface (array): return Surface

    Copy an array to a new surface.

    Create a new Surface that best resembles the data and format on the
    array. The array can be 2D or 3D with any sized integer values.
    """
    global numpysf
    try:
        return numpysf.make_surface(array)
    except AttributeError:
        import pygame._numpysurfarray as numpysf
        return numpysf.make_surface(array)
Example #2
0
def make_surface(array):
    """pygame.surfarray.make_surface (array): return Surface

    Copy an array to a new surface.

    Create a new Surface that best resembles the data and format on the
    array. The array can be 2D or 3D with any sized integer values.
    """
    return numpysf.make_surface(array)
Example #3
0
def make_surface(array):
    """pygame.surfarray.make_surface (array): return Surface

    Copy an array to a new surface.

    Create a new Surface that best resembles the data and format on the
    array. The array can be 2D or 3D with any sized integer values.
    """
    return numpysf.make_surface (array)
Example #4
0
def make_surface(array):
    """pygame.surfarray.make_surface (array): return Surface

    Copy an array to a new surface.

    Create a new Surface that best resembles the data and format on the
    array. The array can be 2D or 3D with any sized integer values.
    """
    if __arraytype == "numeric":
        return numericsf.make_surface(array)
    elif __arraytype == "numpy":
        return numpysf.make_surface(array)
    raise NotImplementedError("surface arrays are not supported")
Example #5
0
def make_surface(array):
    """pygame.surfarray.make_surface (array): return Surface

    Copy an array to a new surface.

    Create a new Surface that best resembles the data and format on the
    array. The array can be 2D or 3D with any sized integer values.
    """
    if __arraytype == "numeric":
        return numericsf.make_surface(array)
    elif __arraytype == "numpy":
        return numpysf.make_surface(array)
    raise NotImplementedError("surface arrays are not supported")