Loading src/com/android/gallery3d/filtershow/crop/CropDrawingUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.gallery3d.filtershow.crop; import android.graphics.Canvas; Loading Loading @@ -91,6 +92,15 @@ public abstract class CropDrawingUtils { } } public static void drawShadows(Canvas canvas, Paint p, RectF innerBounds, RectF outerBounds) { canvas.drawRect(outerBounds.left, outerBounds.top, innerBounds.right, innerBounds.top, p); canvas.drawRect(innerBounds.right, outerBounds.top, outerBounds.right, innerBounds.bottom, p); canvas.drawRect(innerBounds.left, innerBounds.bottom, outerBounds.right, outerBounds.bottom, p); canvas.drawRect(outerBounds.left, innerBounds.top, innerBounds.left, outerBounds.bottom, p); } public static Matrix getBitmapToDisplayMatrix(RectF imageBounds, RectF displayBounds) { Matrix m = new Matrix(); CropDrawingUtils.setBitmapToDisplayMatrix(m, imageBounds, displayBounds); Loading src/com/android/gallery3d/filtershow/crop/CropMath.java +2 −2 Original line number Diff line number Diff line Loading @@ -194,9 +194,9 @@ public class CropMath { float finalW = origW; float finalH = origH; if (origA < a) { finalH = origH / a; finalH = origW / a; } else { finalW = origW * a; finalW = origH * a; } float centX = r.centerX(); float centY = r.centerY(); Loading src/com/android/gallery3d/filtershow/crop/CropObject.java +1 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ public class CropObject { throw new IllegalArgumentException("bad edge selected"); // return false; } if ((mFixAspectRatio && !checkCorner(edge)) && !checkBlock(edge)) { if ((mFixAspectRatio && !checkCorner(edge)) && !checkBlock(edge) && edge != MOVE_NONE) { // temporary throw new IllegalArgumentException("bad corner selected"); // return false; Loading Loading
src/com/android/gallery3d/filtershow/crop/CropDrawingUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.gallery3d.filtershow.crop; import android.graphics.Canvas; Loading Loading @@ -91,6 +92,15 @@ public abstract class CropDrawingUtils { } } public static void drawShadows(Canvas canvas, Paint p, RectF innerBounds, RectF outerBounds) { canvas.drawRect(outerBounds.left, outerBounds.top, innerBounds.right, innerBounds.top, p); canvas.drawRect(innerBounds.right, outerBounds.top, outerBounds.right, innerBounds.bottom, p); canvas.drawRect(innerBounds.left, innerBounds.bottom, outerBounds.right, outerBounds.bottom, p); canvas.drawRect(outerBounds.left, innerBounds.top, innerBounds.left, outerBounds.bottom, p); } public static Matrix getBitmapToDisplayMatrix(RectF imageBounds, RectF displayBounds) { Matrix m = new Matrix(); CropDrawingUtils.setBitmapToDisplayMatrix(m, imageBounds, displayBounds); Loading
src/com/android/gallery3d/filtershow/crop/CropMath.java +2 −2 Original line number Diff line number Diff line Loading @@ -194,9 +194,9 @@ public class CropMath { float finalW = origW; float finalH = origH; if (origA < a) { finalH = origH / a; finalH = origW / a; } else { finalW = origW * a; finalW = origH * a; } float centX = r.centerX(); float centY = r.centerY(); Loading
src/com/android/gallery3d/filtershow/crop/CropObject.java +1 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ public class CropObject { throw new IllegalArgumentException("bad edge selected"); // return false; } if ((mFixAspectRatio && !checkCorner(edge)) && !checkBlock(edge)) { if ((mFixAspectRatio && !checkCorner(edge)) && !checkBlock(edge) && edge != MOVE_NONE) { // temporary throw new IllegalArgumentException("bad corner selected"); // return false; Loading