Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb993ff1 authored by nicolasroard's avatar nicolasroard Committed by Android (Google) Code Review
Browse files

Merge "Express the borders size in percentages" into gb-ub-photos-arches

parents d6453edc f129cb70
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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);