summaryrefslogtreecommitdiff
path: root/src/us/minak/IMEGestureOverlayView.java
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-05-06 22:06:02 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-05-06 22:06:02 -0400
commit5730e7768e605990191f0c5803b3358191cb1ea1 (patch)
treed4b7a7ceca05fdd9a363bd346d9e535383e6e989 /src/us/minak/IMEGestureOverlayView.java
parent2439ddcbfff697f95546583240e358c270226adc (diff)
Added back those files Luke deleted and added circle display (positions may need to be fiddled with)
Diffstat (limited to 'src/us/minak/IMEGestureOverlayView.java')
-rw-r--r--src/us/minak/IMEGestureOverlayView.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/us/minak/IMEGestureOverlayView.java b/src/us/minak/IMEGestureOverlayView.java
index 1a88cd6..b167c53 100644
--- a/src/us/minak/IMEGestureOverlayView.java
+++ b/src/us/minak/IMEGestureOverlayView.java
@@ -12,6 +12,7 @@
package us.minak;
+import java.util.LinkedList;
import java.util.List;
import android.content.Context;
@@ -21,7 +22,6 @@ import android.gesture.GestureOverlayView;
import android.gesture.GestureOverlayView.OnGesturePerformedListener;
import android.gesture.Prediction;
import android.graphics.Canvas;
-import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
@@ -32,6 +32,7 @@ public class IMEGestureOverlayView extends GestureOverlayView implements OnGestu
private static final double SCORE_TRESHOLD = 3.0;
private final GestureLibrary mGestureLibrary;
private StringReciever mOnGestureRecognizedListener;
+ public List<MetaCircle> circles = new LinkedList<MetaCircle>();
public IMEGestureOverlayView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -59,19 +60,12 @@ public class IMEGestureOverlayView extends GestureOverlayView implements OnGestu
}
}
}
- private final Paint mPaintRed = new Paint();
- private final Paint mPaintBlue = new Paint();
+
public void onDraw(Canvas canvas) {
- mPaintRed.setColor(Color.RED);
- mPaintBlue.setColor(Color.BLUE);
- canvas.drawCircle(
- 0F/*(float)(canvas.getWidth()/2.0)*/,
- 0F/*(float)(canvas.getHeight()/2.0)*/,
- 10F,
- mPaintRed);
- canvas.drawLine(0, 0,
- canvas.getWidth(),
- canvas.getHeight(),
- mPaintBlue);
+ for (MetaCircle circle : circles) {
+ final Paint p = new Paint();
+ p.setColor(circle.color);
+ canvas.drawCircle(circle.x, circle.y, circle.radius, p);
+ }
}
}