summaryrefslogtreecommitdiff
path: root/src/us/minak/IMEGestureOverlayView.java
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-05-06 23:42:58 -0400
committernfoy <nfoy@purdue.edu>2014-05-06 23:42:58 -0400
commit44d81a5076dd860b6cb3dc90a9875ca3c62fbe1d (patch)
tree1e2e434523e805fd2ef297285d55724e48645c33 /src/us/minak/IMEGestureOverlayView.java
parente9c9159f7efd8d13f70e0cc9fe3a19848c486329 (diff)
parent5a7bbdeae6bde0c3ae202de7bac8a797fc51a68c (diff)
Merge branch 'master' of https://github.com/AndrewMurrell/minak
Diffstat (limited to 'src/us/minak/IMEGestureOverlayView.java')
-rw-r--r--src/us/minak/IMEGestureOverlayView.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/us/minak/IMEGestureOverlayView.java b/src/us/minak/IMEGestureOverlayView.java
index 7e8867d..e27b70a 100644
--- a/src/us/minak/IMEGestureOverlayView.java
+++ b/src/us/minak/IMEGestureOverlayView.java
@@ -22,7 +22,6 @@ import android.gesture.GestureOverlayView;
import android.gesture.GestureOverlayView.OnGesturePerformedListener;
import android.gesture.Prediction;
import android.graphics.Canvas;
-import android.graphics.Paint;
import android.util.AttributeSet;
/**
@@ -32,8 +31,8 @@ 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>();
- private final Paint mPaint = new Paint();
+ public List<IMEModifierCircle> circles = new LinkedList<IMEModifierCircle>();
+ private final IMEModifiers modifiers = new IMEModifiers();
public IMEGestureOverlayView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -62,10 +61,9 @@ public class IMEGestureOverlayView extends GestureOverlayView implements OnGestu
}
}
+ @Override
public void onDraw(Canvas canvas) {
- for (MetaCircle circle : circles) {
- mPaint.setColor(circle.color);
- canvas.drawCircle(circle.x, circle.y, circle.radius, mPaint);
- }
+ float d = Math.min(canvas.getWidth(), canvas.getHeight());
+ modifiers.draw(canvas, d/2, d/2, d*.4F);
}
}