use of com.android.gallery3d.filtershow.filters.FilterRepresentation 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();
}
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation 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);
}
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorRotate method reflectCurrentFilter.
@Override
public void reflectCurrentFilter() {
MasterImage master = MasterImage.getImage();
master.setCurrentFilterRepresentation(master.getPreset().getFilterWithSerializationName(FilterRotateRepresentation.SERIALIZATION_NAME));
super.reflectCurrentFilter();
FilterRepresentation rep = getLocalRepresentation();
if (rep == null || rep instanceof FilterRotateRepresentation) {
mImageRotate.setFilterRotateRepresentation((FilterRotateRepresentation) rep);
} else {
Log.w(TAG, "Could not reflect current filter, not of type: " + FilterRotateRepresentation.class.getSimpleName());
}
mImageRotate.invalidate();
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorColorBorder method reflectCurrentFilter.
@Override
public void reflectCurrentFilter() {
super.reflectCurrentFilter();
FilterRepresentation rep = getLocalRepresentation();
if (rep != null && getLocalRepresentation() instanceof FilterColorBorderRepresentation) {
FilterColorBorderRepresentation cbRep = (FilterColorBorderRepresentation) getLocalRepresentation();
if (!ParametricEditor.useCompact(mContext)) {
if (mTabletUI != null) {
mTabletUI.setColorBorderRepresentation(cbRep);
}
}
cbRep.setPramMode(FilterColorBorderRepresentation.PARAM_SIZE);
mParameterString = mContext.getString(R.string.color_border_size);
if (mEditControl != null) {
control(cbRep.getCurrentParam(), mEditControl);
}
}
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorDraw method reflectCurrentFilter.
@Override
public void reflectCurrentFilter() {
super.reflectCurrentFilter();
FilterRepresentation rep = getLocalRepresentation();
if (rep != null && getLocalRepresentation() instanceof FilterDrawRepresentation) {
FilterDrawRepresentation drawRep = (FilterDrawRepresentation) getLocalRepresentation();
mImageDraw.setFilterDrawRepresentation(drawRep);
if (!ParametricEditor.useCompact(mContext)) {
if (mTabletUI != null) {
mTabletUI.setDrawRepresentation(drawRep);
}
return;
}
drawRep.getParam(FilterDrawRepresentation.PARAM_STYLE).setFilterView(this);
drawRep.setPramMode(FilterDrawRepresentation.PARAM_COLOR);
mParameterString = mContext.getString(R.string.draw_color);
control(drawRep.getCurrentParam(), mEditControl);
}
}
Aggregations