3 namespace PsychlopsSilverlight3test
\r
6 public class PsychlopsMain
\r
17 public void psychlops_main()
\r
19 cnvs = new Canvas(500, 500);
\r
20 img = new Image(isize * 2, isize * 2);
\r
21 fixation = new Rectangle(10, 10);
\r
22 fixation.fill = Color.red;
\r
23 var poly = new Rectangle(100, 100);
\r
24 //var poly = new Letters("日本語");
\r
25 //var poly = new Polygon(); poly.append(0, 100); poly.append(-100, 0); poly.append(0, -100); poly.append(100, 0);
\r
26 //var poly = new Ellipse(100, 100);
\r
27 //var poly = new Line(0,0,100, 0);
\r
28 poly.fill = Color.red;
\r
29 poly.stroke = new Stroke { color = Color.yellow, thick = 1 };
\r
32 var rng = new Interval();
\r
33 var slider = new Psychlops.Widgets.Slider( "tesrt", 0<=rng<=5 );
\r
39 cnvs.clear(new Color(Mouse.left.pressed() ? 0.75 : 0.5));
\r
40 col.set(Math.random(1.0));
\r
42 fixation.centering();
\r
43 fixation.draw(Color.red);
\r
45 //Figures.drawGabor(ref img, 20, 100, 1, 0, frames * 2.0 * Math.PI / tfreq / 60);
\r
46 //Figures.drawGaussian(ref img, 20, 1);
\r
47 Figures.drawGrating(ref img, 30, 30, 20, 1, 2, frames * 2.0 * Math.PI / tfreq / 60);
\r
48 img.centering(Mouse.position);
\r
51 shape.centering(Mouse.position).shift(100,0);
\r
53 if (Keyboard.spc.pressed()) cnvs.var(Mouse.x, 100, 100);
\r
55 cnvs.var(frames, 10, 20);
\r
57 fixation.shift(100,100);
\r
58 fixation.draw(new Stroke(Color.blue, 3));
\r