summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-05-06 21:48:40 -0400
committerDavisLWebb <davislwebb@ymail.com>2014-05-06 21:48:40 -0400
commitf27edb06cae88115d1ee6c122a15ec750e8db5f0 (patch)
treee2ef6ab1263437244533f965187dd97f2612c5cb
parent5badea811573367bc80b2601209f0bea5c4bc2f8 (diff)
parent1abc4527631be867cb0da780b6a3de6d28aa1f12 (diff)
Merge branch 'master' of https://github.com/AndrewMurrell/minak
-rw-r--r--doc/1251.odp (renamed from 1251.odp)bin11501 -> 11501 bytes
-rw-r--r--src/us/minak/IMEGestureOverlayView.java27
-rw-r--r--src/us/minak/MetaCircle.java29
-rw-r--r--src/us/minak/MetaExpression.java24
4 files changed, 15 insertions, 65 deletions
diff --git a/1251.odp b/doc/1251.odp
index 0324f2d..0324f2d 100644
--- a/1251.odp
+++ b/doc/1251.odp
Binary files differ
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;
- }
-}