Browse Source

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/etri-smartspaces

Daniel Kauth 10 years ago
parent
commit
7d3d65c601
1 changed files with 1 additions and 10 deletions
  1. 1 10
      bbiwarg/Images/TouchImage.cs

+ 1 - 10
bbiwarg/Images/TouchImage.cs

@@ -38,16 +38,7 @@ namespace bbiwarg.Images
             int size = 5;
             if (tis == TouchImageState.touchTracked || tis == TouchImageState.touchDetected)
             {
-                for (int i = x - size; i < x + size; i++)
-                {
-                    for (int j = y - size; j < y + size; j++)
-                    {
-                        if (i >= 0 && j >= 0 && i <= image.Width && j <= image.Height && Math.Sqrt(((x - i) * (x - i)) + ((y - j) * (y - j))) <= size)
-                        {
-                            image.Data[j, i, 0] = (byte)tis;
-                        }
-                    }
-                }
+                image.Draw(new CircleF(new System.Drawing.PointF(x, y), 5), new Gray((byte) tis), 0);
             }
         }