3 namespace PsychlopsSilverlight3test
\r
5 public class PsychlopsMain
\r
15 public void initialize()
\r
17 cnvs = new Canvas(500, 500);
\r
18 img = new Image(isize * 2, isize * 2);
\r
19 fixation = new Rectangle(10, 10);
\r
20 var poly = new Letters("日本語");
\r
22 cnvs.clear(Color.gray);
\r
25 public void each_frames()
\r
27 cnvs.clear(new Color(Mouse.left.pressed() ? 0.75 : 0.25));
\r
28 col.set(Math.random(1.0));
\r
30 fixation.centering();
\r
31 fixation.draw(Color.red);
\r
33 Figures.drawGabor(ref img, 20, 10, 1, 0, cnvs.frame * 2.0 * Math.PI / tfreq / 60);
\r
34 //Figures.drawGaussian(ref img, 20, 1);
\r
35 //Figures.drawGrating(10, 1, 2, cnvs.frame * 2.0 * Math.PI / tfreq / 60);
\r
36 img.centering(Mouse.position);
\r
39 shape.centering(Mouse.position);
\r
40 shape.draw(Color.red);
\r
41 if (Keyboard.spc.pressed()) cnvs.var(Mouse.x, 100, 100);
\r