seed r438 - trunk/examples
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r438 - trunk/examples
- Date: Sat, 13 Dec 2008 00:07:21 +0000 (UTC)
Author: racarr
Date: Sat Dec 13 00:07:20 2008
New Revision: 438
URL: http://svn.gnome.org/viewvc/seed?rev=438&view=rev
Log:
Add clutter-cairo example.
Added:
trunk/examples/clutter-cairo.js (contents, props changed)
Modified:
trunk/examples/Makefile.am
Modified: trunk/examples/Makefile.am
==============================================================================
--- trunk/examples/Makefile.am (original)
+++ trunk/examples/Makefile.am Sat Dec 13 00:07:20 2008
@@ -7,6 +7,7 @@
examplesdir=$(datadir)/doc/seed/examples
examples_DATA = \
actions.js \
+ clutter-cairo.js \
calculator.js \
gconf.js \
video.js \
@@ -28,6 +29,7 @@
EXTRA_DIST = \
actions.js \
calculator.js \
+ clutter-cairo.js \
gconf.js \
video.js \
accelgroup.js \
Added: trunk/examples/clutter-cairo.js
==============================================================================
--- (empty file)
+++ trunk/examples/clutter-cairo.js Sat Dec 13 00:07:20 2008
@@ -0,0 +1,30 @@
+#!/usr/local/bin/seed
+Seed.import_namespace("Canvas");
+Seed.import_namespace("Clutter");
+Seed.import_namespace("ClutterCairo");
+
+Clutter.init(null, null);
+
+c = ClutterCairo.ClutterCairo._new(100, 100);
+cr = c.create();
+
+ctx = new Canvas.CairoCanvas(cr);
+
+ctx.fillStyle = "rgb(200,0,0)";
+ctx.fillRect (10, 10, 55, 50);
+
+ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
+ctx.fillRect (30, 30, 55, 50);
+
+c.width = c.height = 100;
+c.x = c.y = 100;
+
+ctx.destroy()SW;
+
+s = new Clutter.Stage();
+
+s.add_actor(c);
+
+s.show_all();
+
+Clutter.main();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]