add framework for boxes
[turbulence.git] / t / bloom.vala
bloba739a3853e8ea24c62381a4cb354cf42fc92150c
1 /*
2 * turbulence/t/bloom.vala
4 * Copyright (c) 2008 Patrick Walton <pcwalton@uchicago.edu>
5 */
7 using GLib;
8 using Gdk;
9 using Clutter;
10 using Cairo;
11 using Turbulence;
13 namespace TurbulenceTests {
14 public class Bloom : Object {
15 construct {
16 Clutter.Color blue, white;
17 Clutter.Color.parse("blue", out blue);
18 Clutter.Color.parse("white", out white);
20 Stage stage = (Stage)Stage.get_default();
21 stage.color = blue;
23 Gdk.Pixbuf pixbuf = new Gdk.Pixbuf.from_file("chrono.jpg");
25 Texture tex_a = new Texture.from_pixbuf(pixbuf);
26 tex_a.x = 25;
27 tex_a.y = 25;
28 stage.add_actor(tex_a);
30 ActorModel tex_m = new ActorModel(tex_a);
31 BloomFilter bloom = new BloomFilter();
32 tex_m.filter = bloom;
34 stage.show_all();
35 Clutter.main();
38 public static void main(string[] args)
40 Clutter.init(ref args);
41 new TurbulenceTests.Bloom();