Trait gdk_pixbuf::prelude::PixbufAnimationExt
source · pub trait PixbufAnimationExt: IsA<PixbufAnimation> + Sealed + '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
Provided Methods§
sourcefn height(&self) -> i32
fn height(&self) -> i32
Queries the height of the bounding box of a pixbuf animation.
§Returns
Height of the bounding box of the animation.
sourcefn static_image(&self) -> Option<Pixbuf>
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
sourcefn width(&self) -> i32
fn width(&self) -> i32
Queries the width of the bounding box of a pixbuf animation.
§Returns
Width of the bounding box of the animation.
sourcefn is_static_image(&self) -> bool
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