当前位置: 首页>>代码示例>>Java>>正文


Java FilterStraightenRepresentation类代码示例

本文整理汇总了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();
}
 
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:17,代码来源:EditorStraighten.java

示例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();
        }
    }
}
 
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:21,代码来源:GeometryMathUtils.java

示例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);
}
 
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:14,代码来源:ImagePreset.java

示例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;
}
 
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:43,代码来源:ImagePreset.java

示例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();
}
 
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:7,代码来源:GeometryMathUtils.java

示例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();
}
 
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:7,代码来源:GeometryMathUtils.java

示例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();
}
 
开发者ID:asm-products,项目名称:nexus-gallery,代码行数:5,代码来源:ImageStraighten.java


注:本文中的com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。