jupylet/resource.py
def image(name, flip_x=False, flip_y=False, rotate=0, atlas=True, autocrop=False):
    """Load an image with optional transformation.

    This is similar to `texture`, except the resulting image will be
    packed into a :py:class:`~pyglet.image.atlas.TextureBin` if it is an appropriate size for packing.
    This is more efficient than loading images into separate textures.

    :Parameters:
        `name` : str
            Filename of the image source to load.
        `flip_x` : bool
            If True, the returned image will be flipped horizontally.
        `flip_y` : bool
            If True, the returned image will be flipped vertically.
        `rotate` : int
            The returned image will be rotated clockwise by the given
            number of degrees (a multiple of 90).
        `atlas` : bool
            If True, the image will be loaded into an atlas managed by
            pyglet. If atlas loading is not appropriate for specific
            texturing reasons (e.g. border control is required) then set
            this argument to False.

    :rtype: `Texture`
    :return: A complete texture if the image is large or not in an atlas,
        otherwise a :py:class:`~pyglet.image.TextureRegion` of a texture atlas.
    """
    _loader._require_index()

    name0 = name + '-autocrop' if autocrop else name

    if name0 in _loader._cached_images:
        identity = _loader._cached_images[name0]
    else:
        identity = _loader._cached_images[name0] = _alloc_image(name, atlas=atlas, autocrop=autocrop)

    if not rotate and not flip_x and not flip_y:
        return identity

    return identity.get_transform(flip_x, flip_y, rotate)
Load an image with optional transformation.

    This is similar to `texture`, except the resulting image will be
    packed into a :py:class:`~pyglet.image.atlas.TextureBin` if it is an appropriate size for packing.
    This is more efficient than loading images into separate textures.

    :Parameters:
        `name` : str
            Filename of the image source to load.
        `flip_x` : bool
            If True, the returned image will be flipped horizontally.
        `flip_y` : bool
            If True, the returned image will be flipped vertically.
        `rotate` : int
            The returned image will be rotated clockwise by the given
            number of degrees (a multiple of 90).
        `atlas` : bool
            If True, the image will be loaded into an atlas managed by
            pyglet. If atlas loading is not appropriate for specific
            texturing reasons (e.g. border control is required) then set
            this argument to False.

    :rtype: `Texture`
    :return: A complete texture if the image is large or not in an atlas,
        otherwise a :py:class:`~pyglet.image.TextureRegion` of a texture atlas.
    
Load an image with optional transformation.
This is similar to `texture`, except the resulting image will be
packed into a :py:class:`~pyglet.image.atlas.TextureBin` if it is an appropriate size for packing.
This is more efficient than loading images into separate textures.
Load an image with optional transformation . This is similar to ` texture ` except the resulting image will be packed into a : py : class : ` ~pyglet . image . atlas . TextureBin ` if it is an appropriate size for packing . This is more efficient than loading images into separate textures .
def image(name, flip_x=False, flip_y=False, rotate=0, atlas=True, autocrop=False):
    _loader._require_index()
    name0 = name + '-autocrop' if autocrop else name
    if name0 in _loader._cached_images:
        identity = _loader._cached_images[name0]
    else:
        identity = _loader._cached_images[name0] = _alloc_image(name, atlas=atlas, autocrop=autocrop)
    if not rotate and not flip_x and not flip_y:
        return identity
    return identity.get_transform(flip_x, flip_y, rotate)
def image ( name , flip_x = False , flip_y = False , rotate = 0 , atlas = True , autocrop = False ) : _loader . _require_index ( ) name0 = name + '-autocrop' if autocrop else name if name0 in _loader . _cached_images : identity = _loader . _cached_images [ name0 ] else : identity = _loader . _cached_images [ name0 ] = _alloc_image ( name , atlas = atlas , autocrop = autocrop ) if not rotate and not flip_x and not flip_y : return identity return identity . get_transform ( flip_x , flip_y , rotate )
Load an image with optional transformation.
Load an image with optional transformation .
"""Load an image with optional transformation.

    This is similar to `texture`, except the resulting image will be
    packed into a :py:class:`~pyglet.image.atlas.TextureBin` if it is an appropriate size for packing.
    This is more efficient than loading images into separate textures.

    :Parameters:
        `name` : str
            Filename of the image source to load.
        `flip_x` : bool
            If True, the returned image will be flipped horizontally.
        `flip_y` : bool
            If True, the returned image will be flipped vertically.
        `rotate` : int
            The returned image will be rotated clockwise by the given
            number of degrees (a multiple of 90).
        `atlas` : bool
            If True, the image will be loaded into an atlas managed by
            pyglet. If atlas loading is not appropriate for specific
            texturing reasons (e.g. border control is required) then set
            this argument to False.

    :rtype: `Texture`
    :return: A complete texture if the image is large or not in an atlas,
        otherwise a :py:class:`~pyglet.image.TextureRegion` of a texture atlas.
    """
A complete texture if the image is large or not in an atlas,
otherwise a :py:class:`~pyglet.image.TextureRegion` of a texture atlas.
A complete texture if the image is large or not in an atlas otherwise a : py : class : ` ~pyglet . image . TextureRegion ` of a texture atlas .
`Texture`
name
flip_x
flip_y
rotate
atlas
autocrop
Parameters
`name` : str
Filename of the image source to load.
`flip_x` : bool
If True, the returned image will be flipped horizontally.
`flip_y` : bool
If True, the returned image will be flipped vertically.
`rotate` : int
The returned image will be rotated clockwise by the given
number of degrees (a multiple of 90).
`atlas` : bool
If True, the image will be loaded into an atlas managed by
pyglet. If atlas loading is not appropriate for specific
texturing reasons  then set
this argument to False.
` name ` : str Filename of the image source to load . ` flip_x ` : bool If True the returned image will be flipped horizontally . ` flip_y ` : bool If True the returned image will be flipped vertically . ` rotate ` : int The returned image will be rotated clockwise by the given number of degrees ( a multiple of 90 ) . ` atlas ` : bool If True the image will be loaded into an atlas managed by pyglet . If atlas loading is not appropriate for specific texturing reasons then set this argument to False .