X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test4%2FPsychlopsMain.cs;h=e7b6754780f382ae9a881551bed5bd11685ef34f;hb=a18f323a3bf447b6f2ce12d0d1a4f39a07814e93;hp=d33eb149eaadea2591768e58401599d13073bbfe;hpb=e1bcd188a9eeb10582140f13e77b5857f9244816;p=psychlops%2Fsilverlight.git diff --git a/test4/PsychlopsMain.cs b/test4/PsychlopsMain.cs index d33eb14..e7b6754 100644 --- a/test4/PsychlopsMain.cs +++ b/test4/PsychlopsMain.cs @@ -1,4 +1,4 @@ -using Psychlops; +/*using Psychlops; namespace PsychlopsSilverlight4test { @@ -108,9 +108,9 @@ namespace PsychlopsSilverlight4test } } +*/ -/* -using Psychlops; +/*using Psychlops; namespace PsychlopsSilverlight4test { @@ -159,7 +159,7 @@ namespace PsychlopsSilverlight4test */ -/* + using Psychlops; namespace Psychlops @@ -195,19 +195,24 @@ namespace PsychlopsSilverlight4test { Canvas cnvs; Image img; - Rectangle fixation; + Ellipse fixation; Shape shape; Color col; int isize = 100; double tfreq = 1; int frames; RandomDots dots; + Group g; public void psychlops_main() { cnvs = new Canvas(500, 500); + g = new Group(); img = new Image(isize * 2, isize * 2); - fixation = new Rectangle(10, 10); + Figures.drawGrating(ref img, 200, 200, 20, 1, 2, frames * 2.0 * Math.PI / tfreq / 60); + g.append(img); + g.rotation = 50; + fixation = new Ellipse(10, 10); fixation.fill = Color.red; //var poly = new Rectangle(100, 100); var poly = new Letters("日本語"); @@ -228,17 +233,26 @@ namespace PsychlopsSilverlight4test { frames++; + cnvs.clear(new Color(Mouse.left.pressed() ? 0.75 : 0.5)); col.set(Math.random(1.0)); + /*if (frames % 2 == 0) + { + fixation.centering().shift(100, 100); + fixation.draw(new Stroke(Color.blue, 3)); + }*/ + fixation.centering(); fixation.draw(Color.red); //Figures.drawGabor(ref img, 20, 100, 1, 0, frames * 2.0 * Math.PI / tfreq / 60); //Figures.drawGaussian(ref img, 20, 1); - Figures.drawGrating(ref img, 200, 200, 20, 1, 2, frames * 2.0 * Math.PI / tfreq / 60); + //Figures.drawGrating(ref img, 200, 200, 20, 1, 2, frames * 2.0 * Math.PI / tfreq / 60); img.centering(Mouse.position); img.draw(); + //g.centering(Mouse.position).draw(); + //g.rotation += 1; shape.centering(Mouse.position).shift(100, 0); shape.draw(); @@ -247,8 +261,11 @@ namespace PsychlopsSilverlight4test cnvs.var(frames, 0, 20); slider.value = frames / 100.0; - fixation.shift(100, 100); - fixation.draw(new Stroke(Color.blue, 3)); + /*if (frames % 2 != 0) + { + fixation.shift(100, 100); + fixation.draw(new Stroke(Color.green, 3)); + }*/ for (int i = 0; i < dots.cood.Length; i++) { @@ -260,6 +277,5 @@ namespace PsychlopsSilverlight4test } } } - } -*/ +