當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。