[seed] [clutter-cogl] Update 0.9 version of the example to match the fact that the COGL introspection data



commit 22ec7bb209d838b5bdd8a8742b7d83f9c0877167
Author: Tim Horton <hortont svn gnome org>
Date:   Sun Jun 14 13:54:42 2009 -0400

    [clutter-cogl] Update 0.9 version of the example to match the fact that the COGL introspection data is now separate from that of Clutter

 examples/clutter-cogl-0.9.js |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/examples/clutter-cogl-0.9.js b/examples/clutter-cogl-0.9.js
index 6f7fe6f..c4e82fb 100755
--- a/examples/clutter-cogl-0.9.js
+++ b/examples/clutter-cogl-0.9.js
@@ -5,6 +5,7 @@ imports.gi.versions.Clutter = "0.9";
 Clutter = imports.gi.Clutter;
 GLib = imports.gi.GLib;
 GObject = imports.gi.GObject;
+Cogl = imports.gi.Cogl;
 
 const RIPPLE_S = 2000;
 const RIPPLE_W = 8;
@@ -32,18 +33,18 @@ function circle_paint (actor){
     
     actor.fill_color.alpha = actor.opacity;
     
-    Clutter.cogl_set_source_color(actor.fill_color);
-    Clutter.cogl_path_move_to(radius, radius);
-    Clutter.cogl_path_arc(radius, radius, radius, radius,
+    Cogl.set_source_color(actor.fill_color);
+    Cogl.path_move_to(radius, radius);
+    Cogl.path_arc(radius, radius, radius, radius,
 			  deg_to_rad(0),
 			  deg_to_rad(360));
-    Clutter.cogl_path_line_to(radius - RIPPLE_WX/2, radius);
-    Clutter.cogl_path_arc(radius, radius, 
+    Cogl.path_line_to(radius - RIPPLE_WX/2, radius);
+    Cogl.path_arc(radius, radius, 
 			  radius-RIPPLE_WX/2, radius-RIPPLE_WX/2,
 			  deg_to_rad(0),
 			  deg_to_rad(360));
-    Clutter.cogl_path_close();
-    Clutter.cogl_path_fill();	
+    Cogl.path_close();
+    Cogl.path_fill();	
 }
 
 function ripple(stage, x, y){
@@ -73,9 +74,9 @@ function ripple(stage, x, y){
 	
 		actor.anim = actor.animate(Clutter.AnimationMode.EASE_OUT_BOUNCE, RIPPLE_S,
 		{
-			width: [GObject.TYPE_INT, SCREEN_W / RIPPLE_W],
-			height: [GObject.TYPE_INT, SCREEN_W / RIPPLE_W],
-			opacity: [GObject.TYPE_UCHAR, 0]
+			width: SCREEN_W / RIPPLE_W,
+			height: SCREEN_W / RIPPLE_W,
+			opacity: 0
 		});
 	
 		actor.anim.timeline.start();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]