Note that there are some explanatory texts on larger screens.

plurals
  1. POGTK# and PixbufAnimation iteration
    text
    copied!<p>Greetings,</p> <p>I'm having a problem using Gdk.PixbufAnimationIter of a PixbufAnimation. The code goes something like this:</p> <pre><code>Gdk.PixbufAnimation animation = new Gdk.PixbufAnimation(System.IO.Path.Combine([filepath], [filename])); Gdk.PixbufAnimationIter iter = animation.GetIter([Current Time as IntPtr]); </code></pre> <p>Here's what I read about PixbufAnimation.Iter:</p> <blockquote> <p><code>start_time</code> is the start time specified as a float as output from the Python <code>time.time()</code> function. <code>start_time</code> marks the beginning of the animation playback.</p> </blockquote> <p>GTK# does not have the <code>time.time()</code> function, and I have tried the following:</p> <pre><code>long StartTime = DateTime.Now.Millisecond; IntPtr SysTime = new IntPtr (&amp;StartTime); Gdk.PixbufAnimationIter iter = animation.GetIter(SysTime); </code></pre> <p>But that does not seem to retrieve any time consistently. The numbers generated from this seem very random, and are probably pulling from the wrong address in memory (only a guess, don't quote me on that).</p> <p>I have also read this from another documentation of PixbufAnimation:</p> <blockquote> <p>As a shortcut, if start_time is <code>NULL</code>, the result of <code>g_get_current_time()</code> will be used automatically.</p> </blockquote> <p>However, the compiler refuses to allow a <code>NULL</code> value for the IntPtr.</p> <p>I have also read that the "Current Time" is only used if you are trying to mess with the animation, such as making the animation display faster or slower.</p> <p>Can anyone out there help me?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload