diff options
author | nicolasroard <nicolasroard@google.com> | 2012-10-23 15:10:51 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-23 15:10:51 -0700 |
commit | 6d11b1dbc13df616528283037d6d9fcd62919dfc (patch) | |
tree | dbee82f89352e671946de303e134c6d040caaf24 | |
parent | c29cd805fb9f955029e86c1283c6b2d17ec0cf19 (diff) | |
parent | 02ed57d123ba96cca284f78df8c6eba776e710ee (diff) | |
download | android_packages_apps_Snap-6d11b1dbc13df616528283037d6d9fcd62919dfc.tar.gz android_packages_apps_Snap-6d11b1dbc13df616528283037d6d9fcd62919dfc.tar.bz2 android_packages_apps_Snap-6d11b1dbc13df616528283037d6d9fcd62919dfc.zip |
am cb993ff1: Merge "Express the borders size in percentages" into gb-ub-photos-arches
* commit 'cb993ff18944a7ba1981406c3c8adf3fe36755c0':
Express the borders size in percentages
-rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 3 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index c8c7421f1..5a898c2c3 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -120,7 +120,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, private static final int SELECT_PICTURE = 1; private static final String LOGTAG = "FilterShowActivity"; protected static final boolean ANIMATE_PANELS = true; - private static int mImageBorderSize = 40; + private static int mImageBorderSize = 4; // in percent private boolean mShowingHistoryPanel = false; private boolean mShowingImageStatePanel = false; @@ -154,7 +154,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, ImageButtonTitle.setTextPadding((int) getPixelsFromDip(10)); ImageSmallFilter.setMargin((int) getPixelsFromDip(3)); ImageSmallFilter.setTextMargin((int) getPixelsFromDip(4)); - mImageBorderSize = (int) getPixelsFromDip(20); Drawable curveHandle = getResources().getDrawable(R.drawable.camera_crop); int curveHandleSize = (int) getResources().getDimension(R.dimen.crop_indicator_size); Spline.setCurveHandle(curveHandle, curveHandleSize); diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java index 5c5c0b496..3d6954691 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java @@ -82,8 +82,8 @@ public class ImageFilterParametricBorder extends ImageFilter { border.moveTo(0, 0); int w = bitmap.getWidth(); int h = bitmap.getHeight(); - float bs = mBorderSize * scaleFactor; - float r = mBorderCornerRadius * scaleFactor; + float bs = mBorderSize / 100.0f * bitmap.getWidth(); + float r = mBorderCornerRadius / 100.0f * bitmap.getWidth(); border.lineTo(0, h); border.lineTo(w, h); border.lineTo(w, 0); |