Skip to content

Commit

Permalink
Normalize coordinates and update Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauszus committed Sep 19, 2016
1 parent 49d4a4e commit 68e7d58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/src/main/java/com/lauszus/dronedraw/DrawActivity.java
Expand Up @@ -166,6 +166,9 @@ private void uploadCsvFile() {
float[] xy = new float[2];
mPathMeasure.getPosTan(mPathMeasure.getLength() * t, xy, null);

xy[0] /= mDrawView.getWidth(); // Normalize coordinates
xy[1] /= mDrawView.getHeight();

writer.writeNext(new String[]{Integer.toString(i), Float.toString(xy[0]), Float.toString(xy[1]), "1"});

//if (D) Log.d(TAG, "t: " + t + " x: " + xy[0] + " y: " + xy[1]);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.5.2'
}
}
Expand Down

0 comments on commit 68e7d58

Please sign in to comment.