summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-05-06 23:57:53 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-05-06 23:57:53 -0400
commitf520a2479f3d471c830e14373bf84574acd32763 (patch)
tree6cc6ce08ac718b1b1724f6ed18ff4e8983283a45
parent44d81a5076dd860b6cb3dc90a9875ca3c62fbe1d (diff)
touch up modifier circle dimensions
-rw-r--r--src/us/minak/IMEGestureOverlayView.java2
-rw-r--r--src/us/minak/IMEModifiers.java14
2 files changed, 9 insertions, 7 deletions
diff --git a/src/us/minak/IMEGestureOverlayView.java b/src/us/minak/IMEGestureOverlayView.java
index e27b70a..37724b9 100644
--- a/src/us/minak/IMEGestureOverlayView.java
+++ b/src/us/minak/IMEGestureOverlayView.java
@@ -64,6 +64,6 @@ public class IMEGestureOverlayView extends GestureOverlayView implements OnGestu
@Override
public void onDraw(Canvas canvas) {
float d = Math.min(canvas.getWidth(), canvas.getHeight());
- modifiers.draw(canvas, d/2, d/2, d*.4F);
+ modifiers.draw(canvas, d/2, d/2, d*.47F);
}
}
diff --git a/src/us/minak/IMEModifiers.java b/src/us/minak/IMEModifiers.java
index ef49f17..d4cc6d3 100644
--- a/src/us/minak/IMEModifiers.java
+++ b/src/us/minak/IMEModifiers.java
@@ -25,13 +25,15 @@ public class IMEModifiers {
public void draw(Canvas canvas, float cx, float cy, float r) {
this.cx = cx;
this.cy = cy;
- innerR = r*(1.0/3.0);
- outerR = (float)(r*(2.0/3.0));
+ innerR = r*(1.2/3.0);
+ outerR = r*(1.8/3.0);
radEach = (Math.PI*2.0)/modifiers.length;
-
+
+ double textR = r*.8;
+
double rad = 0;
float[] hsv = {0F, 1F, .75F};
-
+
for (int i = 0; i < modifiers.length; i++) {
rad = radEach * i;
hsv[0] = (float)Math.toDegrees(rad);
@@ -44,8 +46,8 @@ public class IMEModifiers {
colorPaint);
canvas.drawText(
modifiers[i],
- (float)(cx+innerR*Math.cos(rad)),
- (float)(cy+innerR*Math.sin(rad)),
+ (float)(cx+textR*Math.cos(rad)),
+ (float)(cy+textR*Math.sin(rad)),
textPaint);
}
}