]> git.cworth.org Git - wordgame/commitdiff
Add back randomization
authorCarl Worth <cworth@cworth.org>
Sun, 10 Dec 2006 06:35:54 +0000 (22:35 -0800)
committerCarl Worth <cworth@cworth.org>
Sun, 10 Dec 2006 06:35:54 +0000 (22:35 -0800)
demo-item.c
demo-item.h
rack-fancy.c

index e34eb4c53d53df39f3982d8554959c2d7db72fe3..4a9bbfdd6b43320db6d7fc3e3f83f31efadbe39c 100644 (file)
@@ -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. */
index 180b599f98a857b2cdf1e0d2adc5e21870e4c7c1..8cc4712b512e20c100e6b8218bd98556b9e28a2f 100644 (file)
@@ -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__ */
index 8fc516f41788f87d828264afda97b08e37041b3c..310e6dd54943d55f98c1c6043456c13b0d2b924b 100644 (file)
@@ -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;