OSDN Git Service

many
authorunknown <hskwk@.(none)>
Fri, 19 Mar 2010 13:54:34 +0000 (22:54 +0900)
committerunknown <hskwk@.(none)>
Fri, 19 Mar 2010 13:54:34 +0000 (22:54 +0900)
13 files changed:
dev3/PsychlopsSilverlight3.csproj
dev3/psychlops/core/app/misc.cs
dev3/psychlops/core/device/clock.cs [new file with mode: 0644]
dev3/psychlops/core/graphic/canvas.cs
dev3/psychlops/core/graphic/font.cs
dev3/psychlops/core/graphic/image.cs [new file with mode: 0644]
dev3/psychlops/core/graphic/module.cs
dev3/psychlops/core/graphic/shape.cs
dev3/psychlops/core/math/interval.cs [new file with mode: 0644]
dev3/psychlops/core/math/matrix.cs [new file with mode: 0644]
dev3/psychlops/extention/media/svg.cs [new file with mode: 0644]
test3/MainPage.xaml.cs
test3/PsychlopsMain.cs

index 362d30b..001db3b 100644 (file)
   <ItemGroup>\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
     <Compile Include="psychlops\core\app\misc.cs" />\r
+    <Compile Include="psychlops\core\device\clock.cs" />\r
     <Compile Include="psychlops\core\device\hid.cs" />\r
     <Compile Include="psychlops\core\graphic\canvas.cs" />\r
+    <Compile Include="psychlops\core\graphic\image.cs" />\r
     <Compile Include="psychlops\core\graphic\font.cs" />\r
     <Compile Include="psychlops\core\graphic\module.cs" />\r
+    <Compile Include="psychlops\core\math\interval.cs" />\r
+    <Compile Include="psychlops\core\math\matrix.cs" />\r
     <Compile Include="psychlops\core\math\util.cs" />\r
+    <Compile Include="psychlops\extention\media\svg.cs" />\r
     <Compile Include="psychlops\extention\standard\figures.cs" />\r
     <Compile Include="psychlops\extention\standard\widget.cs" />\r
     <Compile Include="psychlops\psychlops.cs" />\r
index 87aa503..25e7956 100644 (file)
@@ -5,7 +5,20 @@
        {\r
                public static Drawable drawable;\r
                public static Canvas canvas;\r
-               public static System.Threading.Thread routine;\r
-               public static System.Threading.AutoResetEvent flag;\r
+\r
+       }\r
+\r
+       namespace Internal\r
+       {\r
+               public static class Main\r
+               {\r
+                       public static System.Threading.Thread routine;\r
+                       public static System.Threading.AutoResetEvent canvas_flag;\r
+\r
+                       static Main()\r
+                       {\r
+                               canvas_flag = new System.Threading.AutoResetEvent(false);\r
+                       }\r
+               }\r
        }\r
 }\r
diff --git a/dev3/psychlops/core/device/clock.cs b/dev3/psychlops/core/device/clock.cs
new file mode 100644 (file)
index 0000000..2a19011
--- /dev/null
@@ -0,0 +1,6 @@
+using System;\r
+\r
+namespace Psychlops\r
+{\r
+\r
+}\r
index f621e31..d9e0d37 100644 (file)
@@ -13,12 +13,82 @@ using System.Windows.Shapes;
 namespace Psychlops\r
 {\r
 \r
-       public class Canvas : Drawable\r
+       namespace Templates\r
+       {\r
+\r
+               public class StackableDrawable : Drawable\r
+               {\r
+                       protected System.Collections.Generic.Queue<Internal.PrimitiveFigure> stack;\r
+\r
+                       public StackableDrawable()\r
+                       {\r
+                               stack = new System.Collections.Generic.Queue<Internal.PrimitiveFigure>();\r
+                       }\r
+\r
+                       public void clear()\r
+                       {\r
+                               clear(Color.black);\r
+                       }\r
+                       public virtual void clear(Color col)\r
+                       {\r
+                               //rect(back_panel, col);\r
+                       }\r
+\r
+                       public virtual void pix(int x, int y, Color col)\r
+                       {\r
+                       }\r
+\r
+                       public virtual void line(Line drawee)\r
+                       {\r
+                               stack.Enqueue(drawee.clone());\r
+                       }\r
+\r
+                       public virtual void rect(Rectangle drawee)\r
+                       {\r
+                               stack.Enqueue(drawee.clone());\r
+                       }\r
+\r
+                       public virtual void ellipse(Ellipse drawee)\r
+                       {\r
+                               stack.Enqueue(drawee.clone());\r
+                       }\r
+\r
+                       public virtual void polygon(Polygon drawee)\r
+                       {\r
+                               stack.Enqueue(drawee.clone());\r
+                       }\r
+\r
+                       public virtual void letters(Letters drawee)\r
+                       {\r
+                               stack.Enqueue(drawee.clone());\r
+                       }\r
+\r
+                       public virtual void image(Image drawee)\r
+                       {\r
+                               stack.Enqueue(drawee.clone());\r
+                       }\r
+\r
+                       public void msg(string str, double x, double y) { msg(str, x, y, Color.white); }\r
+                       public virtual void msg(string str, double x, double y, Color col)\r
+                       {\r
+                               var let = new Letters(str);\r
+                               let.locate(x, y);\r
+                               let.fill = col;\r
+                               this.letters(let);\r
+                       }\r
+                       public void var<Type>(Type val, double x, double y) { msg(val.ToString(), x, y, Color.white); }\r
+                       public void var<Type>(Type val, double x, double y, Color col) { msg(val.ToString(), x, y, col); }\r
+\r
+                       public virtual Point getCenter() { return new Point(0, 0, 0); }\r
+               }\r
+\r
+       }\r
+\r
+       public class Canvas : Templates.StackableDrawable\r
        {\r
 \r
                #region initializer\r
 \r
-               System.Collections.Generic.Queue<Figure> stock;\r
                internal delegate void TwoIntProcedure(int x, int y);\r
                internal delegate void SimpleProcedure();\r
                SimpleProcedure flipexec;\r
@@ -58,7 +128,6 @@ namespace Psychlops
 \r
                        back_panel = new Rectangle(wid, hei);\r
 \r
-                       stock = new System.Collections.Generic.Queue<Figure>();\r
                        flipexec = new SimpleProcedure(executeFlip);\r
                }\r
                protected void initialize__(int wid, int hei)\r
@@ -104,105 +173,43 @@ namespace Psychlops
                #endregion\r
 \r
 \r
-               public void clear()\r
+               public override void clear(Color col)\r
                {\r
-                       clear(Color.black);\r
-               }\r
-               public void clear(Color col)\r
-               {\r
-                       //api_canvas.Children.Clear();\r
-                       rect(back_panel, col);\r
-               }\r
-\r
-               public void pix(int x, int y, Color col)\r
-               {\r
-                       //buffer.SetPixel(x, y, col);\r
+                       back_panel.fill = col;\r
+                       rect(back_panel);\r
                }\r
 \r
-               public void line(Line drawee, Color col)\r
-               {\r
-                       var tmp = drawee.clone();\r
-                       tmp.fill = col;\r
-                       stock.Enqueue(tmp);\r
-               }\r
-               public void line(Line drawee)\r
-               {\r
-                       stock.Enqueue(drawee.clone());\r
-               }\r
-               public void rect(Rectangle drawee, Color col)\r
-               {\r
-                       var tmp = drawee.clone();\r
-                       tmp.fill = col;\r
-                       stock.Enqueue(tmp);\r
-               }\r
-               public void rect(Rectangle drawee)\r
-               {\r
-                       stock.Enqueue(drawee.clone());\r
-               }\r
-               public void ellipse(Ellipse drawee, Color col)\r
-               {\r
-                       var tmp = drawee.clone();\r
-                       tmp.fill = col;\r
-                       stock.Enqueue(tmp);\r
-               }\r
-               public void ellipse(Ellipse drawee)\r
-               {\r
-                       stock.Enqueue(drawee.clone());\r
-               }\r
-               public void polygon(Polygon drawee, Color col)\r
-               {\r
-                       var tmp = drawee.clone();\r
-                       tmp.fill = col;\r
-                       stock.Enqueue(tmp);\r
-               }\r
-               public void polygon(Polygon drawee)\r
-               {\r
-                       stock.Enqueue(drawee.clone());\r
-               }\r
-               public void letters(Letters drawee, Color col)\r
-               {\r
-                       var tmp = drawee.clone();\r
-                       tmp.fill = col;\r
-                       stock.Enqueue(tmp);\r
-               }\r
-               public void letters(Letters drawee)\r
-               {\r
-                       stock.Enqueue(drawee.clone());\r
-               }\r
-               public void image(Image drawee)\r
-               {\r
-                       //buffer.Blit(drawee.datum, drawee.buffer, drawee.self_rect, Colors.White, WriteableBitmapExtensions.BlendMode.None);\r
-                       stock.Enqueue(drawee.clone());\r
-               }\r
-\r
-\r
-               public void msg(string str, double x, double y) { msg(str, x, y, Color.white); }\r
-               public void msg(string str, double x, double y, Color col)\r
-               {\r
-                       var let = new Letters(str);\r
-                       let.locate(x, y);\r
-                       this.letters(let, col);\r
-               }\r
-               public void var<Type>(Type val, double x, double y) { msg(val.ToString(), x, y, Color.white); }\r
-               public void var<Type>(Type val, double x, double y, Color col) { msg(val.ToString(), x, y, col); }\r
-\r
-\r
+               int nextIntervalFrame = 1;\r
                public void flip()\r
                {\r
                        //api_canvas.Dispatcher.BeginInvoke(flipexec);\r
                        //flipexec();\r
                        //System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);\r
-                       Main.flag.WaitOne();\r
+                       lock (this)\r
+                       {\r
+                               nextIntervalFrame = 1;\r
+                       }\r
+                       Internal.Main.canvas_flag.WaitOne();\r
                }\r
-               \r
                public void executeFlip()\r
                {\r
-                       api_canvas.Children.Clear();\r
-                       foreach (Figure f in stock)\r
+                       lock (this)\r
                        {\r
-                               api_canvas.Children.Add(f.toNative());\r
+                               nextIntervalFrame--;\r
                        }\r
-                       stock.Clear();\r
+                       if (nextIntervalFrame <= 0)\r
+                       {\r
+                               var tmp = new System.Windows.Controls.Canvas();\r
+                               foreach (Internal.PrimitiveFigure f in stack)\r
+                               {\r
+                                       tmp.Children.Add(f.toNative());\r
+                               }\r
+                               api_canvas.Children.Clear();\r
+                               api_canvas.Children.Add(tmp);\r
+                               stack.Clear();\r
+                               Psychlops.Internal.Main.canvas_flag.Set();\r
+                       }\r
+                       System.Threading.Thread.Sleep(0);\r
                }\r
 \r
                #region Properties\r
@@ -212,7 +219,7 @@ namespace Psychlops
                public Point center { get { return new Point(width / 2.0, height / 2.0, 0); } }\r
                public double getWidth() { return width; }\r
                public double getHeight() { return height; }\r
-               public Point getCenter() { return center; }\r
+               public override Point getCenter() { return center; }\r
                public double getHCenter() { return width / 2; }\r
                public double getVCenter() { return height / 2; }\r
                public double getRefreshRate() { return 60; }\r
@@ -224,6 +231,7 @@ namespace Psychlops
 \r
 \r
 \r
+       #region primitive tokenizer\r
 \r
        partial struct Point\r
        {\r
@@ -433,9 +441,7 @@ namespace Psychlops
                public UIElement toNative() { return this; }\r
        }\r
 \r
-       internal class CanvasTokenizer\r
-       {\r
+       #endregion\r
 \r
-       }\r
 \r
 }
\ No newline at end of file
index 8c8140c..95dd6bc 100644 (file)
@@ -122,10 +122,6 @@ namespace Psychlops
                {\r
                        Main.drawable.letters(this);\r
                }\r
-               public void draw(Color c)\r
-               {\r
-                       Main.drawable.letters(this, c);\r
-               }\r
 \r
                public Color fill { get; set; }\r
                public Stroke stroke { get; set; }\r
diff --git a/dev3/psychlops/core/graphic/image.cs b/dev3/psychlops/core/graphic/image.cs
new file mode 100644 (file)
index 0000000..06d0641
--- /dev/null
@@ -0,0 +1,73 @@
+using System;\r
+using System.Windows;\r
+using System.Windows.Controls;\r
+using System.Windows.Documents;\r
+using System.Windows.Input;\r
+using System.Windows.Media;\r
+using System.Windows.Media.Animation;\r
+using System.Windows.Media.Imaging;\r
+using System.Windows.Shapes;\r
+\r
+\r
+namespace Psychlops{\r
+\r
+\r
+       public partial class Image : Internal.PrimitiveFigure\r
+       {\r
+               public WriteableBitmap buffer;\r
+               public Point datum;\r
+               public Rectangle self_rect;\r
+\r
+               public Image(int wid, int hei)\r
+               {\r
+                       initialize__(wid, hei);\r
+                       self_rect = new Rectangle(wid, hei);\r
+               }\r
+\r
+               /*public Image shift(double x, double y)\r
+               {\r
+                       datum.x += x;\r
+                       datum.y += y;\r
+                       return this;\r
+               }*/\r
+               public Figure shift(Point p)\r
+               {\r
+                       datum += p;\r
+                       return this;\r
+               }\r
+               public Figure centering(Point p)\r
+               {\r
+                       datum.x = p.x - width / 2.0;\r
+                       datum.y = p.y - height / 2.0;\r
+                       return this;\r
+               }\r
+\r
+               public void pix(int x, int y, Color col)\r
+               {\r
+                       buffer.SetPixel(x, y, col);\r
+               }\r
+\r
+\r
+               public void field(System.Func<int, int, System.Windows.Media.Color> func)\r
+               {\r
+                       field__(func);\r
+                       //buffer.ForEach(func);\r
+               }\r
+               public void field(System.Func<int, int, System.Windows.Media.Color, System.Windows.Media.Color> func)\r
+               {\r
+                       field__(func);\r
+                       //buffer.ForEach(func);\r
+               }\r
+\r
+               public void draw()\r
+               {\r
+                       Main.drawable.image(this);\r
+               }\r
+\r
+               public double width { get { return self_rect.width; } }\r
+               public double height { get { return self_rect.height; } }\r
+\r
+       }\r
+\r
+\r
+}
\ No newline at end of file
index 43b7caa..853717e 100644 (file)
@@ -1,13 +1,5 @@
 using System;\r
 using System.Windows;\r
-using System.Windows.Controls;\r
-using System.Windows.Documents;\r
-using System.Windows.Input;\r
-using System.Windows.Media;\r
-using System.Windows.Media.Animation;\r
-using System.Windows.Media.Imaging;\r
-using System.Windows.Shapes;\r
-\r
 \r
 \r
 namespace Psychlops\r
@@ -105,7 +97,8 @@ namespace Psychlops
                        magenta = new Color(1, 0, 1, 1),\r
                        cyan = new Color(0, 1, 1, 1),\r
                        white = new Color(1, 1, 1, 1),\r
-                       gray = new Color(.5, .5, .5, 1);\r
+                       gray = new Color(.5, .5, .5, 1),\r
+                       null_color = new Color(0, 0, 0, 0);\r
 \r
        }\r
 \r
@@ -116,20 +109,10 @@ namespace Psychlops
                void clear(Color col);\r
                void pix(int x, int y, Color col);\r
                void line(Line drawee);\r
-               void line(Line drawee, Color col);\r
-               //void line(Line drawee, Stroke strk);\r
                void rect(Rectangle drawee);\r
-               void rect(Rectangle drawee, Color col);\r
-               //void rect(Rectangle drawee, Stroke strk);\r
                void ellipse(Ellipse drawee);\r
-               void ellipse(Ellipse drawee, Color col);\r
-               //void ellipse(Ellipse drawee, Stroke strk);\r
                void polygon(Polygon drawee);\r
-               void polygon(Polygon drawee, Color col);\r
-               //void polygon(Polygon drawee, Stroke strk);\r
                void letters(Letters drawee);\r
-               void letters(Letters drawee, Color col);\r
-               //void letters(Letters drawee, Stroke strk);\r
                void image(Image drawee);\r
                void msg(string s, double x, double y, Color c);\r
        }\r
@@ -141,7 +124,6 @@ namespace Psychlops
                Figure shift(Point p);\r
                Figure centering(Point p);\r
                void draw();\r
-               UIElement toNative();\r
        }\r
        public static class FigureExtention\r
        {\r
@@ -159,61 +141,11 @@ namespace Psychlops
                }\r
        }\r
 \r
-       public partial class Image : Figure\r
+       namespace Internal\r
        {\r
-               public WriteableBitmap buffer;\r
-               public Point datum;\r
-               public Rectangle self_rect;\r
-\r
-               public Image(int wid, int hei)\r
-               {\r
-                       initialize__(wid, hei);\r
-                       self_rect = new Rectangle(wid, hei);\r
-               }\r
-\r
-               /*public Image shift(double x, double y)\r
-               {\r
-                       datum.x += x;\r
-                       datum.y += y;\r
-                       return this;\r
-               }*/\r
-               public Figure shift(Point p)\r
-               {\r
-                       datum += p;\r
-                       return this;\r
-               }\r
-               public Figure centering(Point p)\r
-               {\r
-                       datum.x = p.x - width / 2.0;\r
-                       datum.y = p.y - height / 2.0;\r
-                       return this;\r
-               }\r
-\r
-               public void pix(int x, int y, Color col)\r
-               {\r
-                       buffer.SetPixel(x, y, col);\r
-               }\r
-\r
-\r
-               public void field(System.Func<int,int,System.Windows.Media.Color> func)\r
-               {\r
-                       field__(func);\r
-                       //buffer.ForEach(func);\r
-               }\r
-               public void field(System.Func<int, int, System.Windows.Media.Color, System.Windows.Media.Color> func)\r
+               public interface PrimitiveFigure : Figure\r
                {\r
-                       field__(func);\r
-                       //buffer.ForEach(func);\r
+                       UIElement toNative();\r
                }\r
-\r
-               public void draw()\r
-               {\r
-                       Main.drawable.image(this);\r
-               }\r
-\r
-               public double width  { get { return self_rect.width; } }\r
-               public double height { get { return self_rect.height; } }\r
-\r
        }\r
-\r
 }
\ No newline at end of file
index 2933260..cbafab0 100644 (file)
@@ -12,26 +12,44 @@ using System.Windows.Shapes;
 \r
 namespace Psychlops{\r
 \r
-       public interface Shape : Figure\r
+       public interface Shape : Internal.PrimitiveFigure\r
        {\r
-               void draw(Color c);\r
                Color fill { get; set; }\r
                Stroke stroke { get; set; }\r
        }\r
        public static class ShapeExtention\r
        {\r
-               /*\r
-               public static void draw(this Shape drawee)\r
+               public static void draw(this Shape drawee, Color c)\r
                {\r
-                       drawee.draw(Color.white);\r
+                       Color tmp_col = drawee.fill;\r
+                       Stroke tmp_strk = drawee.stroke;\r
+                       drawee.fill = c;\r
+                       drawee.stroke = new Stroke();\r
+                       drawee.draw();\r
+                       drawee.fill = tmp_col;\r
+                       drawee.stroke = tmp_strk;\r
+               }\r
+               public static void draw(this Shape drawee, Stroke strk)\r
+               {\r
+                       Color tmp_col = drawee.fill;\r
+                       Stroke tmp_strk = drawee.stroke;\r
+                       drawee.fill = new Color(0,0,1,1);\r
+                       drawee.stroke = strk;\r
+                       drawee.draw();\r
+                       drawee.fill = tmp_col;\r
+                       drawee.stroke = tmp_strk;\r
                }\r
-               */\r
        }\r
 \r
        public partial struct Stroke\r
        {\r
                public double thick;\r
                public Color color;\r
+               public Stroke(Color c, double t)\r
+               {\r
+                       color = c;\r
+                       thick = t;\r
+               }\r
                public void set(Color c, double t)\r
                {\r
                        color = c;\r
@@ -78,10 +96,6 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw(Color c)\r
-               {\r
-                       Main.drawable.line(this, c);\r
-               }\r
                public void draw()\r
                {\r
                        Main.drawable.line(this);\r
@@ -135,10 +149,6 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw(Color c)\r
-               {\r
-                       Main.drawable.rect(this, c);\r
-               }\r
                public void draw()\r
                {\r
                        Main.drawable.rect(this);\r
@@ -189,10 +199,6 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw(Color c)\r
-               {\r
-                       Main.drawable.ellipse(this, c);\r
-               }\r
                public void draw()\r
                {\r
                        Main.drawable.ellipse(this);\r
@@ -253,10 +259,6 @@ namespace Psychlops{
                        return this;\r
                }\r
 \r
-               public void draw(Color c)\r
-               {\r
-                       Main.drawable.polygon(this, c);\r
-               }\r
                public void draw()\r
                {\r
                        Main.drawable.polygon(this);\r
diff --git a/dev3/psychlops/core/math/interval.cs b/dev3/psychlops/core/math/interval.cs
new file mode 100644 (file)
index 0000000..fd67eb0
--- /dev/null
@@ -0,0 +1,6 @@
+using System;\r
+\r
+namespace Psychlops\r
+{\r
+\r
+}
\ No newline at end of file
diff --git a/dev3/psychlops/core/math/matrix.cs b/dev3/psychlops/core/math/matrix.cs
new file mode 100644 (file)
index 0000000..fd67eb0
--- /dev/null
@@ -0,0 +1,6 @@
+using System;\r
+\r
+namespace Psychlops\r
+{\r
+\r
+}
\ No newline at end of file
diff --git a/dev3/psychlops/extention/media/svg.cs b/dev3/psychlops/extention/media/svg.cs
new file mode 100644 (file)
index 0000000..b2558b7
--- /dev/null
@@ -0,0 +1,8 @@
+\r
+namespace Psychlops\r
+{\r
+\r
+\r
+\r
+\r
+}
\ No newline at end of file
index f2d8960..8bb50a0 100644 (file)
@@ -30,9 +30,8 @@ namespace PsychlopsSilverlight3test
 \r
                        main = new PsychlopsMain();\r
                        //main.initialize();\r
-                       Main.flag = new System.Threading.AutoResetEvent(false);\r
-                       Main.routine = new System.Threading.Thread(main.psychlops_main);\r
-                       Main.routine.Start();\r
+                       Psychlops.Internal.Main.routine = new System.Threading.Thread(main.psychlops_main);\r
+                       Psychlops.Internal.Main.routine.Start();\r
                        //main_routine = main.psychlops_main();\r
 #if DEBUG\r
                        DebugConsole = new System.Windows.Controls.TextBlock();\r
@@ -43,17 +42,14 @@ namespace PsychlopsSilverlight3test
                        this.Focus();\r
                }\r
 \r
-               int nextIntervalFrame = 1;\r
                private void CompositionTarget_Rendering(object sender, System.EventArgs e)\r
                {\r
                        if (Main.canvas != null) Main.canvas.executeFlip();\r
-                       Main.flag.Set();\r
-                       nextIntervalFrame--;\r
-                       if (nextIntervalFrame<=0)\r
-                       {\r
-                               //main_routine.MoveNext();\r
-                               //nextIntervalFrame = main_routine.Current;\r
-                       }\r
+                       //if (nextIntervalFrame-- <= 0)\r
+                       //{\r
+                       //      main_routine.MoveNext();\r
+                       //      nextIntervalFrame = main_routine.Current;\r
+                       //}\r
                }\r
 \r
        }\r
index 30683f8..6f74ea3 100644 (file)
@@ -20,12 +20,13 @@ namespace PsychlopsSilverlight3test
                        img = new Image(isize * 2, isize * 2);\r
                        fixation = new Rectangle(10, 10);\r
                        fixation.fill = Color.red;\r
+                       var poly = new Rectangle(100, 100);\r
                        //var poly = new Letters("日本語");\r
-                       var poly = new Polygon(); poly.append(0, 100); poly.append(-100, 0); poly.append(0, -100); poly.append(100, 0);\r
+                       //var poly = new Polygon(); poly.append(0, 100); poly.append(-100, 0); poly.append(0, -100); poly.append(100, 0);\r
                        //var poly = new Ellipse(100, 100);\r
                        //var poly = new Line(0,0,100, 0);\r
                        poly.fill = Color.red;\r
-                       poly.stroke.set(Color.green, 10);\r
+                       poly.stroke = new Stroke { color = Color.yellow, thick = 1 };\r
                        shape = poly;\r
 \r
 \r
@@ -40,7 +41,7 @@ namespace PsychlopsSilverlight3test
 \r
                                //Figures.drawGabor(ref img, 20, 100, 1, 0, frames * 2.0 * Math.PI / tfreq / 60);\r
                                //Figures.drawGaussian(ref img, 20, 1);\r
-                               Figures.drawGrating(ref img, 500, 500, 20, 1, 2, frames * 2.0 * Math.PI / tfreq / 60);\r
+                               Figures.drawGrating(ref img, 200, 200, 20, 1, 2, frames * 2.0 * Math.PI / tfreq / 60);\r
                                img.centering(Mouse.position);\r
                                img.draw();\r
 \r
@@ -51,7 +52,7 @@ namespace PsychlopsSilverlight3test
                                cnvs.var(frames, 10, 20);\r
 \r
                                fixation.shift(100,100);\r
-                               fixation.draw(Color.blue);\r
+                               fixation.draw(new Stroke(Color.blue, 3));\r
 \r
                                cnvs.flip();\r
                        }\r