GifPlayer
Image view with animated GIF support.
Module | require("yue.gui") |
Type | Class |
Inherits | View |
It can also display other types of images, but only GIF images can be animated.
Displaying animated GIF images consumes lots of CPU resources, it is highly unrecommended to constantly display animated GIF images.
For optimization, hiding the view would automatically pause the animation, and showing the view would automatically resume previous state.
Class methods
create()
Create a new GifPlayer
.
Return
GifPlayer
Methods
setimage(image)
Set the image.
After setting the image, the animated image will start playing automatically.
Parameters
Image
image
getimage()
Return the image.
Return
Image
setanimating(animating)
Set whether the animated image should be played.
Parameters
boolean
animating
isanimating()
Return whether the image is animating.
Return
boolean
setscale(scale)
Set the scaling mode.
The default scaling mode is "none"
.
Parameters
ImageScale
scale
getscale()
Return the scaling mode.
Return
ImageScale