GifPlayer

Display animated GIF images.

Header#include "nativeui/gif_player.h"
Namespacenamespace nu
Typeclass (RefCounted)
InheritsView

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.

Hiding the view would automatically pause the animation, and showing the view would automatically continue the animation if it is enabled.

Constructors

GifPlayer()

Create a new GifPlayer.

Class properties

const char* kClassName

The class name of this view.

Methods

void SetImage(Image* image)

Set the image.

Parameters

Image* GetImage() const

Return the image.

Return

Image*

void SetAnimating(bool animating)

Set whether the animated image should be played.

Parameters

bool IsAnimating() const

Return whether the image is being played.

Return

bool