From 48281e874ef936437b581a444cbd1134cec20edb Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 9 Dec 2006 22:35:54 -0800 Subject: [PATCH] Add back randomization --- demo-item.c | 11 +++++++++++ demo-item.h | 5 +++++ rack-fancy.c | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/demo-item.c b/demo-item.c index e34eb4c..4a9bbfd 100644 --- a/demo-item.c +++ b/demo-item.c @@ -32,6 +32,17 @@ goo_demo_item_move_to (GooCanvasItem *item, goo_canvas_item_set_transform (item, &matrix); } +void +goo_demo_item_glide_to (GooCanvasItem *item, + gdouble x, + gdouble y) +{ + goo_canvas_item_animate (item, x, y, + 1.0, 0, + 1000, 40, + GOO_CANVAS_ANIMATE_FREEZE); +} + /* The convenience function to create new items. This should start with a parent argument and end with a variable list of object properties to fit in with the standard canvas items. */ diff --git a/demo-item.h b/demo-item.h index 180b599..8cc4712 100644 --- a/demo-item.h +++ b/demo-item.h @@ -49,6 +49,11 @@ goo_demo_item_move_to (GooCanvasItem *item, gdouble x, gdouble y); +void +goo_demo_item_glide_to (GooCanvasItem *item, + gdouble x, + gdouble y); + G_END_DECLS #endif /* __GOO_DEMO_ITEM_H__ */ diff --git a/rack-fancy.c b/rack-fancy.c index 8fc516f..310e6dd 100644 --- a/rack-fancy.c +++ b/rack-fancy.c @@ -107,7 +107,7 @@ on_button_press (GooCanvasItem *item, for (i = 0; i < num_letters; i++) { get_letter_position (indices[i], &x, &y); - goo_demo_item_move_to (letter_items[i], x, y); + goo_demo_item_glide_to (letter_items[i], x, y); } return TRUE; -- 2.43.0