Gtk2::G...imation(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Gtk2::Gdk::PixbufAnimation β€” it's a lil wrapper around GdkPixbufAnimation, and bestie, it's exactly what it sounds like ✨

(also it lives in the User Contributed Perl Documentation, section 3, iykyk πŸ’…)


πŸ¦‹ HIERARCHY πŸ¦‹

okay so the family tree is giving very much "one parent, one iconic child":

Glib::Object
+----Gtk2::Gdk::PixbufAnimation

🌸 METHODS 🌸

✨ pixbufanimation = Gtk2::Gdk::PixbufAnimation->new_from_file ($filename)

  • $filename β€” the file name, and yes it's a localized file name, so mind your encodings πŸ’œ
🫢 heads up: this one may croak with a Glib::Error in $@ if it fails. So like, wrap it or check $@, don't just rawdog it 😭

✨ integer = $animation->get_height

gives you back an integer β€” the height. that's the whole thing. slay πŸ’…

✨ boolean = $animation->is_static_image

returns a boolean. is it a static image? the vibes will tell you 🌈

✨ pixbufanimationiter = $animation->get_iter ($start_time_seconds=0, $start_time_microseconds=0)

  • $start_time_seconds β€” an integer ✨
  • $start_time_microseconds β€” also an integer ✨

the seconds and microseconds values come from Time::HiRes, which has been standard since perl 5.8.0 β€” so like, you literally already have it, no cap πŸŽ€

and if both of them are undef or you just don't pass them at all? it uses the current time. easy πŸ’–

✨ pixbuf = $animation->get_static_image

hands you back a pixbuf. the static one. periodt 🧚

✨ integer = $animation->get_width

returns an integer β€” the width. iconic, symmetrical, we love a matching pair πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

  • Gtk2
  • Glib::Object

go read those, they're the moment 🫢


Copyright (C) 2003-2011 by the gtk2-perl team. πŸ’œ

This software is licensed under the LGPL. See Gtk2 for a full notice.


okay bestie that's the whole page, ty for coming to my ted talk 🌸

this was served up by perl v5.42.0, dated 2025-07-25 β€” love that for us πŸ’…βœ¨

πŸ“¦ where this page comes from