[cairo-commit] goocanvas/demo demo-animation.c, 1.1, 1.2 demo.c, 1.15, 1.16 mv-demo-animation.c, 1.1, 1.2 mv-demo.c, 1.3, 1.4

Damon Chaplin commit at pdx.freedesktop.org
Mon Feb 19 03:43:42 PST 2007


Committed by: damon

Update of /cvs/cairo/goocanvas/demo
In directory kemper:/tmp/cvs-serv18571/demo

Modified Files:
	demo-animation.c demo.c mv-demo-animation.c mv-demo.c 
Log Message:
2007-02-19  Damon Chaplin  <damon at gnome.org>

	* demo/demo.c: 
	* demo/mv-demo.c: 
	* demo/demo-animation.c: 
	* demo/mv-demo-animation.c: made the file-global variables static so
	they don't clash, and updated the demos a bit.



Index: demo-animation.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/demo-animation.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- demo-animation.c	13 Feb 2007 12:32:44 -0000	1.1
+++ demo-animation.c	19 Feb 2007 11:43:36 -0000	1.2
@@ -4,7 +4,7 @@
 #include <goocanvas.h>
 
 
-GooCanvasItem *ellipse1, *ellipse2, *rect1, *rect2, *rect3, *rect4;
+static GooCanvasItem *ellipse1, *ellipse2, *rect1, *rect2, *rect3, *rect4;
 
 
 static void

Index: demo.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/demo.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- demo.c	15 Feb 2007 14:18:50 -0000	1.15
+++ demo.c	19 Feb 2007 11:43:36 -0000	1.16
@@ -17,10 +17,10 @@
 #include <goocanvas.h>
 #include "demo-item.h"
 
-GooCanvasItem *ellipse2, *textitem;
+static GooCanvasItem *ellipse2, *textitem;
 
-gboolean dragging = FALSE;
-double drag_x, drag_y;
+static gboolean dragging = FALSE;
+static double drag_x, drag_y;
 
 static void setup_canvas (GooCanvas *canvas);
 GtkWidget *create_canvas_fifteen (void);
@@ -188,7 +188,7 @@
     }
   else if (last_state == 5)
     {
-      goo_canvas_item_set_simple_transform (ellipse2, -50, -50, 0.2, 225);
+      goo_canvas_item_set_simple_transform (ellipse2, 50, 50, 0.2, 225);
       last_state = 6;
     }
   else

Index: mv-demo-animation.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/mv-demo-animation.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mv-demo-animation.c	13 Feb 2007 12:32:44 -0000	1.1
+++ mv-demo-animation.c	19 Feb 2007 11:43:36 -0000	1.2
@@ -4,8 +4,8 @@
 #include <goocanvas.h>
 
 
-GooCanvasItemModel *root = NULL;
-GooCanvasItemModel *ellipse1, *ellipse2, *rect1, *rect2, *rect3, *rect4;
+static GooCanvasItemModel *root = NULL;
+static GooCanvasItemModel *ellipse1, *ellipse2, *rect1, *rect2, *rect3, *rect4;
 
 
 static void

Index: mv-demo.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/mv-demo.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mv-demo.c	15 Feb 2007 14:18:50 -0000	1.3
+++ mv-demo.c	19 Feb 2007 11:43:36 -0000	1.4
@@ -16,10 +16,10 @@
 #endif
 #include <goocanvas.h>
 
-GooCanvasItemModel *ellipse2, *textitem;
+static GooCanvasItemModel *ellipse2, *textitem;
 
-gboolean dragging = FALSE;
-double drag_x, drag_y;
+static gboolean dragging = FALSE;
+static double drag_x, drag_y;
 
 GtkWidget *create_canvas_fifteen (void);
 GtkWidget *create_canvas_features (void);
@@ -164,6 +164,31 @@
 		    NULL);
       last_state = 2;
     }
+  else if (last_state == 2)
+    {
+      g_object_set (ellipse2,
+		    "center-x", 0.0,
+		    "center-y", 0.0,
+		    "radius-y", 30.0,
+		    NULL);
+      goo_canvas_item_model_set_simple_transform (ellipse2, 100, 100, 1, 0);
+      last_state = 3;
+    }
+  else if (last_state == 3)
+    {
+      goo_canvas_item_model_set_simple_transform (ellipse2, 200, 100, 2, 0);
+      last_state = 4;
+    }
+  else if (last_state == 4)
+    {
+      goo_canvas_item_model_set_simple_transform (ellipse2, 200, 200, 1, 45);
+      last_state = 5;
+    }
+  else if (last_state == 5)
+    {
+      goo_canvas_item_model_set_simple_transform (ellipse2, 50, 50, 0.2, 225);
+      last_state = 6;
+    }
   else
     {
       g_object_set (ellipse2,



More information about the cairo-commit mailing list