use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorDualCamFusion method reflectCurrentFilter.
@Override
public void reflectCurrentFilter() {
super.reflectCurrentFilter();
FilterRepresentation rep = getLocalRepresentation();
if (rep != null && rep instanceof FilterDualCamFusionRepresentation) {
FilterDualCamFusionRepresentation dualRep = (FilterDualCamFusionRepresentation) rep;
mImageFusion.setRepresentation(dualRep);
}
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorDualCamFusion method setUnderlayImageUri.
public void setUnderlayImageUri(Uri uri) {
mUnderlayUri = uri;
FilterRepresentation filter = getLocalRepresentation();
if (filter instanceof FilterDualCamFusionRepresentation) {
mImageFusion.setUnderlay(uri);
commitLocalRepresentation();
// save fusion underlay uri
GalleryUtils.setStringPref(mContext, mContext.getString(R.string.pref_dualcam_fusion_underlay_key), (uri != null) ? uri.toString() : null);
}
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorMirror method reflectCurrentFilter.
@Override
public void reflectCurrentFilter() {
MasterImage master = MasterImage.getImage();
master.setCurrentFilterRepresentation(master.getPreset().getFilterWithSerializationName(FilterMirrorRepresentation.SERIALIZATION_NAME));
super.reflectCurrentFilter();
FilterRepresentation rep = getLocalRepresentation();
if (rep == null || rep instanceof FilterMirrorRepresentation) {
mImageMirror.setFilterMirrorRepresentation((FilterMirrorRepresentation) rep);
} else {
Log.w(TAG, "Could not reflect current filter, not of type: " + FilterMirrorRepresentation.class.getSimpleName());
}
mImageMirror.invalidate();
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorStraighten method reflectCurrentFilter.
@Override
public void reflectCurrentFilter() {
MasterImage master = MasterImage.getImage();
master.setCurrentFilterRepresentation(master.getPreset().getFilterWithSerializationName(FilterStraightenRepresentation.SERIALIZATION_NAME));
super.reflectCurrentFilter();
FilterRepresentation rep = getLocalRepresentation();
if (rep == null || rep instanceof FilterStraightenRepresentation) {
mImageStraighten.setFilterStraightenRepresentation((FilterStraightenRepresentation) rep);
} else {
Log.w(TAG, "Could not reflect current filter, not of type: " + FilterStraightenRepresentation.class.getSimpleName());
}
mImageStraighten.invalidate();
}
use of com.android.gallery3d.filtershow.filters.FilterRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class EditorTruePortraitImageOnly method openUtilityPanel.
@Override
public void openUtilityPanel(LinearLayout accessoryViewList) {
accessoryViewList.removeAllViews();
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.filtershow_actionbar_trueportrait, accessoryViewList);
View editMask = accessoryViewList.findViewById(R.id.editMask);
editMask.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
FilterRepresentation representation = new FilterRepresentation("");
representation.setEditorId(EditorTruePortraitMask.ID);
((FilterShowActivity) mContext).loadEditorPanel(representation);
}
});
}
Aggregations