[cairo-commit] goocanvas/demo demo.c,1.11,1.12

Damon Chaplin commit at pdx.freedesktop.org
Thu Feb 8 14:56:51 PST 2007


Committed by: damon

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

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

	* src/goocanvasitemmodel.c
	(goo_canvas_item_model_set_simple_transform): 
	* src/goocanvasitem.c (goo_canvas_item_set_simple_transform): new
	convenience functions to set the position, scale and rotation easily.

	* demo/demo.c (move_ellipse_clicked): added tests for
	goo_canvas_item_set_simple_transform().

	* */*: more documentation updates. I've started adding a few
	introductory sections, tidied up a few bits, and tried to update all
	the docs that referred to the old model/view terminology.



Index: demo.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/demo.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- demo.c	1 Feb 2007 01:19:05 -0000	1.11
+++ demo.c	8 Feb 2007 22:56:45 -0000	1.12
@@ -164,6 +164,26 @@
 		    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_set_simple_transform (ellipse2, 100, 100, 1, 0);
+      last_state = 3;
+    }
+  else if (last_state == 3)
+    {
+      goo_canvas_item_set_simple_transform (ellipse2, 200, 100, 2, 0);
+      last_state = 4;
+    }
+  else if (last_state == 4)
+    {
+      goo_canvas_item_set_simple_transform (ellipse2, 200, 200, 0.5, 45);
+      last_state = 5;
+    }
   else
     {
       g_object_set (ellipse2,



More information about the cairo-commit mailing list