diff --git a/README.md b/README.md index de7cc80d..b7ed92b6 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,10 @@ For more information, see the [linked Github Wiki page](https://github.com/Arthu - [Adding auto-zoom feature to Android-Image-Cropper](https://theartofdev.com/2016/04/25/adding-auto-zoom-feature-to-android-image-cropper/) ## Change log +*2.0.1* (Beta) + +- Fix counter clockwise rotation resulting in negative degrees (#54). + *2.0.0* (Beta) - **Auto-zoom**: zoom-in when crop window takes less than 50% of the image, zoom-out when more than 65%. diff --git a/build.gradle b/build.gradle index 4acf6036..c211fd75 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0' + classpath 'com.android.tools.build:gradle:2.1.0' } } diff --git a/cropper/build.gradle b/cropper/build.gradle index f58857f1..0f1c5ee4 100644 --- a/cropper/build.gradle +++ b/cropper/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'maven-publish' ext { PUBLISH_GROUP_ID = 'com.theartofdev.edmodo' PUBLISH_ARTIFACT_ID = 'android-image-cropper' - PUBLISH_VERSION = '2.0.0' + PUBLISH_VERSION = '2.0.1' // gradlew clean build generateRelease } diff --git a/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java b/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java index 1e28ebb4..b06d3327 100644 --- a/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java +++ b/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java @@ -744,7 +744,7 @@ public void rotateImage(int degrees) { mZoomOffsetX = 0; mZoomOffsetY = 0; mDegreesRotated += degrees; - mDegreesRotated = mDegreesRotated % 360; + mDegreesRotated = mDegreesRotated >= 0 ? mDegreesRotated % 360 : mDegreesRotated % 360 + 360; applyImageMatrix(getWidth(), getHeight(), true, false); @@ -758,7 +758,7 @@ public void rotateImage(int degrees) { } else { mDegreesRotated += degrees; - mDegreesRotated = mDegreesRotated % 360; + mDegreesRotated = mDegreesRotated >= 0 ? mDegreesRotated % 360 : mDegreesRotated % 360 + 360; mZoom = 1; mZoomOffsetX = mZoomOffsetY = 0;