summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2000-04-06 20:28:20 +0000
committerJonathan Blandford <jrb@src.gnome.org>2000-04-06 20:28:20 +0000
commitd96d7ada5a5099a6194632b8d246949c524a8b90 (patch)
tree6c5d54085ad9836bbde817cb3499604590c96ea8
parentddd6248ae35b8e8968ce08206300ed5b800edb58 (diff)
downloadgdk-pixbuf-d96d7ada5a5099a6194632b8d246949c524a8b90.tar.gz
add more info to the testanimation frames.
2000-04-06 Jonathan Blandford <jrb@redhat.com> * gdk-pixbuf/testanimation.c (main): add more info to the testanimation frames.
-rw-r--r--demos/testanimation.c17
-rw-r--r--gdk-pixbuf/ChangeLog5
2 files changed, 17 insertions, 5 deletions
diff --git a/demos/testanimation.c b/demos/testanimation.c
index d67b8dd8d..0663ae2e5 100644
--- a/demos/testanimation.c
+++ b/demos/testanimation.c
@@ -238,8 +238,6 @@ config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data)
pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf");
- g_print("X:%d Y:%d\n", event->width, event->height);
-
#if 0
if (((event->width) != (pixbuf->art_pixbuf->width)) ||
((event->height) != (pixbuf->art_pixbuf->height)))
@@ -411,14 +409,23 @@ main (int argc, char **argv)
return 0;
} else {
for (i = 1; i < argc; i++) {
-
animation = gdk_pixbuf_animation_new_from_file (argv[i]);
if (animation) {
+ gint i = 0;
GList *listptr;
for (listptr = animation->frames; listptr; listptr = listptr->next){
- g_print ("in a frame\n");
- new_testrgb_window (((GdkPixbufFrame *)listptr->data)->pixbuf, "File");
+ gchar *title;
+ title = g_strdup_printf ("Frame %d", i);
+ g_print ("Frame %d x:%d y:%d width:%d height:%d\n",
+ i,
+ ((GdkPixbufFrame *)listptr->data)->x_offset,
+ ((GdkPixbufFrame *)listptr->data)->y_offset,
+ gdk_pixbuf_get_width (((GdkPixbufFrame *)listptr->data)->pixbuf),
+ gdk_pixbuf_get_height (((GdkPixbufFrame *)listptr->data)->pixbuf));
+ new_testrgb_window (((GdkPixbufFrame *)listptr->data)->pixbuf, title);
+ g_free (title);
+ i++;
}
found_valid = TRUE;
}
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 16f08f6cf..20bb05992 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-06 Jonathan Blandford <jrb@redhat.com>
+
+ * gdk-pixbuf/testanimation.c (main): add more info to the
+ testanimation frames.
+
2000-04-04 Ettore Perazzoli <ettore@helixcode.com>
* gdk-pixbuf/gdk-pixbuf-animation.c