[ruby-gnome2-doc-cvs] [Hiki] create - Gdk::PixbufAnimationIter

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 11月 30日 (火) 19:17:27 JST


-------------------------
REMOTE_ADDR = 15.211.169.100
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp//?Gdk%3A%3APixbufAnimationIter
-------------------------
= class Gdk::PixbufAnimationIter
A Gdk::PixbufAnimationIter provides the necessary functionality to display an animation.

== Object Hierarchy
* Object
  * GLib::Instantiatable
    * GLib::Object
      * Gdk::PixbufAnimationIter

== Instance Methods
--- advance(current_time_sec = nil, current_time_usec = nil)
    Possibly advances an animation to a new frame. Chooses the frame based on the start time passed to Gdk::PixbufAnimation#get_iter. 
    current_time would normally come from GLib.current_time, and must be greater than or equal to the time passed to Gdk::PixbufAnimation#get_iter, and must increase or remain unchanged each time Gdk::PixbufAnimationIter#pixbuf is called. That is, you can't go backward in time; animations only play forward. 
    As a shortcut, pass nil for the current time and GLib.current_time will be invoked on your behalf. So you only need to explicitly pass current_time if you're doing something odd like playing the animation at double speed. 
    If this method returns false, there's no need to update the animation display, assuming the display had been rendered prior to advancing; if true, you need to call Gdk::PixbufAnimationIter#pixbuf and update the display with the new pixbuf.
    * current_time_sec : current time  sec
    * current_time_usec : current time usec (milliseconds)
    * Returns : true if the image may need updating  

--- delay_time
    Gets the number of milliseconds the current pixbuf should be displayed, or -1 if the current pixbuf should be displayed forever. GLib.timeout_add() conveniently takes a timeout in milliseconds, so you can use a timeout to schedule the next update.
    * Returns: delay time in milliseconds (thousandths of a second)  

--- on_currently_loading_frame?
    Used to determine how to respond to the area_updated signal on Gdk::PixbufLoader when loading an animation. area_updated is emitted for an area of the frame currently streaming in to the loader. So if you're on the currently loading frame, you need to redraw the screen for the updated area.
    * Returns: true if the frame we're on is partially loaded, or the last frame  

--- pixbuf
    Gets the current Gdk::Pixbuf which should be displayed; the pixbuf will be the same size as the animation itself (Gdk::PixbufAnimation#width(), Gdk::PixbufAnimation#height). This pixbuf should be displayed for Gdk::PixbufAnimationIter#delay_time milliseconds. The caller of this method does not own a reference to the returned pixbuf; the returned pixbuf will become invalid when the iterator advances to the next frame, which may happen anytime you call Gdk::PixbufAnimationIter#advance. Copy the pixbuf to keep it (don't just add a reference), as it may get recycled as you advance the iterator.
    * Returns: the Gdk::Pixbuf to be displayed  

== See Also
Gdk::PixbufLoader


-((<Masao>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index