summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/us/minak/IMEGestureOverlayView.java27
-rw-r--r--src/us/minak/MetaCircle.java29
-rw-r--r--src/us/minak/MetaExpression.java24
3 files changed, 15 insertions, 65 deletions
diff --git a/src/us/minak/IMEGestureOverlayView.java b/src/us/minak/IMEGestureOverlayView.java
index 011df3e..1a88cd6 100644
--- a/src/us/minak/IMEGestureOverlayView.java
+++ b/src/us/minak/IMEGestureOverlayView.java
@@ -12,7 +12,6 @@
package us.minak;
-import java.util.LinkedList;
import java.util.List;
import android.content.Context;
@@ -22,6 +21,8 @@ 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;
/**
@@ -31,7 +32,6 @@ 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);
@@ -56,19 +56,22 @@ public class IMEGestureOverlayView extends GestureOverlayView implements OnGestu
mOnGestureRecognizedListener.putString(bestPrediction.name);
} else {
clear(false);
- drawCircles((MetaCircle[]) this.circles.toArray());
}
}
}
-
+ private final Paint mPaintRed = new Paint();
+ private final Paint mPaintBlue = new Paint();
public void onDraw(Canvas canvas) {
- canvas.getHeight();
- }
-
- public void drawCircles (MetaCircle[] circles) {
- for (MetaCircle circle : circles) {
- //draw circle
- ;
- }
+ 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);
}
}
diff --git a/src/us/minak/MetaCircle.java b/src/us/minak/MetaCircle.java
deleted file mode 100644
index 908842a..0000000
--- a/src/us/minak/MetaCircle.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package us.minak;
-
-/*
- * Not sure if this should be drawable or what.
- *
- */
-public class MetaCircle {
- public MetaExpression metaExpr;
- public float x;
- public float y;
- public float radius;
- public int color;
- public boolean expanded;
- public int expansion; //the level of expansion (if multiple circles are expanded, this decides precidence)
-
- MetaCircle(float x, float y, float radius, int color, MetaExpression metaExpr) {
- this.metaExpr = metaExpr;
- this.x = x;
- this.y = y;
- this.radius = radius;
- this.color = color;
- this.expanded = false;
- this.expansion = 0;
- }
-
- public boolean containsPoint(float x, float y) {
- return Math.pow(x - this.x, 2) + Math.pow(y - this.y, 2) < Math.pow(this.radius, 2) ? true : false;
- }
-}
diff --git a/src/us/minak/MetaExpression.java b/src/us/minak/MetaExpression.java
deleted file mode 100644
index 4398c42..0000000
--- a/src/us/minak/MetaExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package us.minak;
-
-public class MetaExpression {
- public enum State {
- ON, OFF, LOCK
- }
-
- public State state;
- private String value;
-
- public String getValue() {
- //however we want to do return this
- return this.value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- MetaExpression(String value) {
- this.value = value;
- this.state = State.OFF;
- }
-}