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

Commit dbc7f587 authored by John Hoford's avatar John Hoford Committed by Android (Google) Code Review
Browse files

Merge "fix draw size and style display" into gb-ub-photos-carlsbad

parents 389e8c88 4e289659
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,6 +46,6 @@
    <color name="gradcontrol_point_shadow_end">#00000000</color>
    <color name="gradcontrol_line_color">#FFFFFF</color>
    <color name="gradcontrol_line_shadow">#000000</color>

    <color name="draw_rect_border">#888888</color>

</resources>
 No newline at end of file
+11 −0
Original line number Diff line number Diff line
@@ -39,5 +39,16 @@
    <!-- Grad filter minimum touch distance -->
    <dimen name="gradcontrol_min_touch_dist">80dip</dimen>

    <!-- Grad filter minimum touch distance -->
    <dimen name="draw_rect_border">20dip</dimen>

    <!-- Grad filter minimum touch distance -->
    <dimen name="draw_rect_shadow">8dip</dimen>

    <!-- Grad filter minimum touch distance -->
    <dimen name="draw_rect_border_edge">2dip</dimen>

    <!-- Grad filter minimum touch distance -->
    <dimen name="draw_rect_round">10dip</dimen>

</resources>
 No newline at end of file
+7 −6
Original line number Diff line number Diff line
@@ -16,24 +16,18 @@

package com.android.gallery3d.filtershow.editors;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager.LayoutParams;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
import android.widget.SeekBar;

import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.FilterShowActivity;
import com.android.gallery3d.filtershow.colorpicker.ColorGridDialog;
import com.android.gallery3d.filtershow.colorpicker.RGBListener;
import com.android.gallery3d.filtershow.controller.BitmapCaller;
import com.android.gallery3d.filtershow.controller.FilterView;
import com.android.gallery3d.filtershow.filters.FilterDrawRepresentation;
@@ -73,6 +67,8 @@ public class EditorDraw extends ParametricEditor implements FilterView {
        }
        String paramString;
        String val = rep.getValueString();

        mImageDraw.displayDrawLook();
        return mParameterString + val;
    }

@@ -189,4 +185,9 @@ public class EditorDraw extends ParametricEditor implements FilterView {
        Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), brushIcons[index]);
        caller.available(bitmap);
    }

    public int getBrushIcon(int type){
       return  brushIcons[type];
    }

}
+12 −4
Original line number Diff line number Diff line
@@ -76,6 +76,10 @@ public class FilterDrawRepresentation extends FilterRepresentation {
        mCurrentParam = mAllParam[mParamMode];
    }

    public int getParamMode() {
        return mParamMode;
    }

    public Parameter getCurrentParam() {
        return  mAllParam[mParamMode];
    }
@@ -223,14 +227,18 @@ public class FilterDrawRepresentation extends FilterRepresentation {
        return Color.HSVToColor(op, hsv);
    }

    public void startNewSection(float x, float y) {
    public void fillStrokeParameters(StrokeData sd){
        byte type = (byte) mParamStyle.getSelected();
        int color = computeCurrentColor();
        float size = mParamSize.getValue();
        sd.mColor = color;
        sd.mRadius = size;
        sd.mType = type;
    }
    
    public void startNewSection(float x, float y) {
        mCurrent = new StrokeData();
        mCurrent.mColor = color;
        mCurrent.mRadius = size;
        mCurrent.mType = type;
        fillStrokeParameters(mCurrent);
        mCurrent.mPath = new Path();
        mCurrent.mPath.moveTo(x, y);
        mCurrent.mPoints[0] = x;
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public class FilterGradRepresentation extends FilterRepresentation
        private int yPos1 = 100;
        private int xPos2 = -1;
        private int yPos2 = 100;
        private int brightness = 40;
        private int brightness = -40;
        private int contrast = 0;
        private int saturation = 0;

Loading