GtkCanvas and Transitions
This week I and Andrunko had some discussions about a light implementation of Gtk components to use in applications with animations like fade, transitions, resizes, like QT uses QGraphicsView.
On Gtk a big discussion already started on gtk-devel mailing list, about a new GtkCanvas implementation. Some studies about the current canvas states can be found at [http://live.gno
While nothing is decided we (I and Andrunko) using the free time, started a implementation of transitions based in GtkTimeline[http://bugzilla.gnome.org/show_bug.cgi?id=444659] .
With this new component you can create animations very easy using GObject properties, like this code above:
transition = gtk_transition_new (2000);
gtk_timeline_set_loop (GTK_TIMELINE (transition), TRUE);
state = gtk_transition_add_state (transition, NULL, G_OBJECT (label), 0.5);
gtk_transition_state_set (state, "angle", 0.0, 360.0, NULL);
state = gtk_transition_add_state (transition, state, G_OBJECT (label), 1.0);
gtk_transition_state_set (state, "angle", 360.0, 0.0, NULL);
gtk_timeline_start (GTK_TIMELINE (transition));
I already have this running on my n800 and my desktop, I will be posting a video later to show you this.
Labels: Gtk canvas linux
0 Comments:
Post a Comment
<< Home