gdk_pixbuf::prelude

Trait PixbufAnimationExt

Source
pub trait PixbufAnimationExt: IsA<PixbufAnimation> + 'static {
    // Provided methods
    fn height(&self) -> i32 { ... }
    fn static_image(&self) -> Option<Pixbuf> { ... }
    fn width(&self) -> i32 { ... }
    fn is_static_image(&self) -> bool { ... }
}
Expand description

Trait containing all PixbufAnimation methods.

§Implementors

PixbufAnimation, PixbufNonAnim, PixbufSimpleAnim

Provided Methods§

Source

fn height(&self) -> i32

Queries the height of the bounding box of a pixbuf animation.

§Returns

Height of the bounding box of the animation.

Source

fn static_image(&self) -> Option<Pixbuf>

Retrieves a static image for the animation.

If an animation is really just a plain image (has only one frame), this function returns that image.

If the animation is an animation, this function returns a reasonable image to use as a static unanimated image, which might be the first frame, or something more sophisticated depending on the file format.

If an animation hasn’t loaded any frames yet, this function will return NULL.

§Returns

unanimated image representing the animation

Source

fn width(&self) -> i32

Queries the width of the bounding box of a pixbuf animation.

§Returns

Width of the bounding box of the animation.

Source

fn is_static_image(&self) -> bool

Checks whether the animation is a static image.

If you load a file with gdk_pixbuf_animation_new_from_file() and it turns out to be a plain, unanimated image, then this function will return TRUE. Use gdk_pixbuf_animation_get_static_image() to retrieve the image.

§Returns

TRUE if the “animation” was really just an image

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§