Search in sources :

Example 6 with FilterGradRepresentation

use of com.android.gallery3d.filtershow.filters.FilterGradRepresentation in project android_packages_apps_Gallery2 by LineageOS.

the class EditorGrad method onProgressChanged.

@Override
public void onProgressChanged(SeekBar sbar, int progress, boolean arg2) {
    FilterRepresentation tmpRep = getLocalRepresentation();
    if (tmpRep instanceof FilterGradRepresentation) {
        FilterGradRepresentation rep = (FilterGradRepresentation) tmpRep;
        int min = rep.getParameterMin(mSliderMode);
        int value = progress + min;
        rep.setParameter(mSliderMode, value);
        mView.invalidate();
        commitLocalRepresentation();
    }
}
Also used : FilterGradRepresentation(com.android.gallery3d.filtershow.filters.FilterGradRepresentation) FilterRepresentation(com.android.gallery3d.filtershow.filters.FilterRepresentation)

Example 7 with FilterGradRepresentation

use of com.android.gallery3d.filtershow.filters.FilterGradRepresentation in project android_packages_apps_Gallery2 by LineageOS.

the class EditorGrad method clearAddMode.

public void clearAddMode() {
    mAddModeButton.setChecked(false);
    FilterRepresentation tmpRep = getLocalRepresentation();
    if (tmpRep instanceof FilterGradRepresentation) {
        updateMenuItems((FilterGradRepresentation) tmpRep);
    }
}
Also used : FilterGradRepresentation(com.android.gallery3d.filtershow.filters.FilterGradRepresentation) FilterRepresentation(com.android.gallery3d.filtershow.filters.FilterRepresentation)

Example 8 with FilterGradRepresentation

use of com.android.gallery3d.filtershow.filters.FilterGradRepresentation in project android_packages_apps_Gallery2 by LineageOS.

the class EditorGrad method fireRightAction.

@Override
public void fireRightAction() {
    FilterGradRepresentation rep = getGradRepresentation();
    if (rep == null) {
        return;
    }
    rep.deleteCurrentBand();
    updateMenuItems(rep);
    updateSeekBar(rep);
    commitLocalRepresentation();
    mView.invalidate();
}
Also used : FilterGradRepresentation(com.android.gallery3d.filtershow.filters.FilterGradRepresentation)

Aggregations

FilterGradRepresentation (com.android.gallery3d.filtershow.filters.FilterGradRepresentation)8 FilterRepresentation (com.android.gallery3d.filtershow.filters.FilterRepresentation)4 MenuItem (android.view.MenuItem)1 PopupMenu (android.widget.PopupMenu)1