diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-07-18 16:37:30 -0700 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2013-08-01 09:46:44 -0700 |
commit | 203eb404a7cd6a80397535e63d22b3772939f03d (patch) | |
tree | c6cc970ad5bf9fc710cb3a8a2a667729b2439623 /src/com/android/gallery3d/filtershow/crop/CropMath.java | |
parent | 3a5bc6b23096365e1a814f8999937028bc12b401 (diff) | |
download | android_packages_apps_Snap-203eb404a7cd6a80397535e63d22b3772939f03d.tar.gz android_packages_apps_Snap-203eb404a7cd6a80397535e63d22b3772939f03d.tar.bz2 android_packages_apps_Snap-203eb404a7cd6a80397535e63d22b3772939f03d.zip |
Refactoring Geometry handling.
Bug: 9170644
Bug: 9366654
Bug: 9366263
- Consolidates all the geometry transforms in GeometryMathUtils and
significantly reduces complexity.
- Removes GeometryMetadata object and dependent code.
- Removes ImageGeometry and geometry update callbacks.
Change-Id: I59add51907459593244c9ebaadef585efc7486d5
Diffstat (limited to 'src/com/android/gallery3d/filtershow/crop/CropMath.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/crop/CropMath.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/filtershow/crop/CropMath.java b/src/com/android/gallery3d/filtershow/crop/CropMath.java index 671554f16..02c65310e 100644 --- a/src/com/android/gallery3d/filtershow/crop/CropMath.java +++ b/src/com/android/gallery3d/filtershow/crop/CropMath.java @@ -20,7 +20,7 @@ import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.RectF; -import com.android.gallery3d.filtershow.imageshow.GeometryMath; +import com.android.gallery3d.filtershow.imageshow.GeometryMathUtils; import java.util.Arrays; @@ -97,8 +97,8 @@ public class CropMath { if (array.length < 2) return; for (int x = 0; x < array.length; x += 2) { - array[x] = GeometryMath.clamp(array[x], imageBound.left, imageBound.right); - array[x + 1] = GeometryMath.clamp(array[x + 1], imageBound.top, imageBound.bottom); + array[x] = GeometryMathUtils.clamp(array[x], imageBound.left, imageBound.right); + array[x + 1] = GeometryMathUtils.clamp(array[x + 1], imageBound.top, imageBound.bottom); } } @@ -119,8 +119,8 @@ public class CropMath { corners[i], corners[(i + 1) % len], corners[(i + 2) % len], corners[(i + 3) % len] }; - float mag = GeometryMath.vectorLength( - GeometryMath.shortestVectorFromPointToLine(point, line)); + float mag = GeometryMathUtils.vectorLength( + GeometryMathUtils.shortestVectorFromPointToLine(point, line)); if (mag < oldMag) { oldMag = mag; bestLine = line; |