本文整理汇总了Java中com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation类的典型用法代码示例。如果您正苦于以下问题:Java FilterStraightenRepresentation类的具体用法?Java FilterStraightenRepresentation怎么用?Java FilterStraightenRepresentation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FilterStraightenRepresentation类属于com.android.gallery3d.filtershow.filters包,在下文中一共展示了FilterStraightenRepresentation类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reflectCurrentFilter
import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; //导入依赖的package包/类
@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();
}
示例2: unpackGeometry
import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; //导入依赖的package包/类
public static void unpackGeometry(GeometryHolder out,
Collection<FilterRepresentation> geometry) {
out.wipe();
// Get geometry data from filters
for (FilterRepresentation r : geometry) {
if (r.isNil()) {
continue;
}
if (r.getSerializationName() == FilterRotateRepresentation.SERIALIZATION_NAME) {
out.rotation = ((FilterRotateRepresentation) r).getRotation();
} else if (r.getSerializationName() ==
FilterStraightenRepresentation.SERIALIZATION_NAME) {
out.straighten = ((FilterStraightenRepresentation) r).getStraighten();
} else if (r.getSerializationName() == FilterCropRepresentation.SERIALIZATION_NAME) {
((FilterCropRepresentation) r).getCrop(out.crop);
} else if (r.getSerializationName() == FilterMirrorRepresentation.SERIALIZATION_NAME) {
out.mirror = ((FilterMirrorRepresentation) r).getMirror();
}
}
}
示例3: creatFilterFromName
import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; //导入依赖的package包/类
FilterRepresentation creatFilterFromName(String name) {
if (FilterRotateRepresentation.SERIALIZATION_NAME.equals(name)) {
return new FilterRotateRepresentation();
} else if (FilterMirrorRepresentation.SERIALIZATION_NAME.equals(name)) {
return new FilterMirrorRepresentation();
} else if (FilterStraightenRepresentation.SERIALIZATION_NAME.equals(name)) {
return new FilterStraightenRepresentation();
} else if (FilterCropRepresentation.SERIALIZATION_NAME.equals(name)) {
return new FilterCropRepresentation();
}
FiltersManager filtersManager = FiltersManager.getManager();
return filtersManager.createFilterFromName(name);
}
示例4: equals
import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; //导入依赖的package包/类
public boolean equals(ImagePreset preset) {
if (preset == null) {
return false;
}
if (preset.mFilters.size() != mFilters.size()) {
return false;
}
if (mDoApplyGeometry != preset.mDoApplyGeometry) {
return false;
}
if (mDoApplyFilters != preset.mDoApplyFilters) {
if (mFilters.size() > 0 || preset.mFilters.size() > 0) {
return false;
}
}
for (int i = 0; i < preset.mFilters.size(); i++) {
FilterRepresentation a = preset.mFilters.elementAt(i);
FilterRepresentation b = mFilters.elementAt(i);
boolean isGeometry = false;
if (a instanceof FilterRotateRepresentation
|| a instanceof FilterMirrorRepresentation
|| a instanceof FilterCropRepresentation
|| a instanceof FilterStraightenRepresentation) {
isGeometry = true;
}
boolean evaluate = true;
if (!isGeometry && mDoApplyGeometry && !mDoApplyFilters) {
evaluate = false;
} else if (isGeometry && !mDoApplyGeometry && mDoApplyFilters) {
evaluate = false;
}
if (evaluate && !a.equals(b)) {
return false;
}
}
return true;
}
示例5: wipe
import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; //导入依赖的package包/类
public void wipe() {
rotation = FilterRotateRepresentation.getNil();
straighten = FilterStraightenRepresentation.getNil();
crop = FilterCropRepresentation.getNil();
mirror = FilterMirrorRepresentation.getNil();
}
示例6: isNil
import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; //导入依赖的package包/类
public boolean isNil() {
return rotation == FilterRotateRepresentation.getNil() &&
straighten == FilterStraightenRepresentation.getNil() &&
crop.equals(FilterCropRepresentation.getNil()) &&
mirror == FilterMirrorRepresentation.getNil();
}
示例7: setFilterStraightenRepresentation
import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; //导入依赖的package包/类
public void setFilterStraightenRepresentation(FilterStraightenRepresentation rep) {
mLocalRep = (rep == null) ? new FilterStraightenRepresentation() : rep;
mInitialAngle = mBaseAngle = mAngle = mLocalRep.getStraighten();
}