This is the Asynchronous Loader. You can use it to load an image and use it, even if data are not yet available. You must specify a default loading image for using a such loader:
from kivy import *
image = Loader.image('mysprite.png')
You can also load image from url:
image = Loader.image('http://mysite.com/test.png')
If you want to change the default loading image, you can do:
Loader.loading_image = Image('another_loading.png')
Bases: object
Common base for Loader and specific implementation. By default, Loader will be the best available loader implementation.
The _update() function is called every 1 / 25.s or each frame if we have less than 25 FPS.
Image used for error (readonly)
Load a image using loader. A Proxy image is returned with a loading image
img = Loader.image(filename)
# img will be a ProxyImage.
# You'll use it the same as an Image class.
# Later, when the image is really loaded,
# the loader will change the img.image property
# to the new loaded image
Image used for loading (readonly)
Main loop for the loader.
Start the loader thread/process
Stop the loader thread/process
Bases: kivy.core.image.Image
Image returned by the Loader.image() function.
Properties : |
|
---|---|
Events : |
|