Android Effect - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Effect class.

This code example shows how to use the following methods: apply, setParameter
                EffectFactory.EFFECT_AUTOFIX);
        mAutoFixEffect.setParameter("scale", 0.4f);
 
        mMinMaxEffect = effectFactory.createEffect(
                EffectFactory.EFFECT_BLACKWHITE);
        mMinMaxEffect.setParameter("black", .1f);
        mMinMaxEffect.setParameter("white", .8f);
    } 
 
    private void applyEffects() { 
        mMinMaxEffect.apply(mTextures[0], mImageWidth, mImageHeight, mTextures[0]);
        mAutoFixEffect.apply(mTextures[0], mImageWidth, mImageHeight, mTextures[0]);
    } 
 
    private void renderResult() { 
        mTexRenderer.renderTexture(mTextures[0]);
    } 
 
    @Override 
    public void onDrawFrame(GL10 gl) {
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: apply, setParameter
    public void process(Photo src, Photo dst) {
        dst.changeDimension(Math.round(bounds.width() * src.width()),
                Math.round(bounds.height() * src.height()));
 
        Effect effect = getEffect(EffectFactory.EFFECT_CROP);
        effect.setParameter("xorigin", Math.round(bounds.left * src.width()));
        effect.setParameter("yorigin", Math.round(bounds.top * src.height()));
        effect.setParameter("width", dst.width());
        effect.setParameter("height", dst.height());
        effect.apply(src.texture(), src.width(), src.height(), dst.texture());
    } 
 
    @Override 
    protected void writeToParcel(Parcel out) {
        out.writeParcelable(bounds, 0);
    } 
 
    @Override 
    protected void readFromParcel(Parcel in) {
        bounds = in.readParcelable(null);
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: apply, setParameter
    } 
 
    @Override 
    public void process(Photo src, Photo dst) {
        Effect effect = getEffect(EffectFactory.EFFECT_FLIP);
        effect.setParameter("horizontal", flips[0]);
        effect.setParameter("vertical", flips[1]);
        effect.apply(src.texture(), src.width(), src.height(), dst.texture());
    } 
 
    @Override 
    protected void writeToParcel(Parcel out) {
        out.writeBooleanArray(flips);
    } 
 
    @Override 
    protected void readFromParcel(Parcel in) {
        in.readBooleanArray(flips);
    } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: apply, setParameter
    } 
 
    @Override 
    public void process(Photo src, Photo dst) {
        Effect effect = getEffect(EffectFactory.EFFECT_STRAIGHTEN);
        effect.setParameter("maxAngle", MAX_DEGREES);
        effect.setParameter("angle", -degrees);
        effect.apply(src.texture(), src.width(), src.height(), dst.texture());
    } 
 
    @Override 
    protected void writeToParcel(Parcel out) {
        out.writeFloat(degrees);
    } 
 
    @Override 
    protected void readFromParcel(Parcel in) {
        degrees = in.readFloat();
    } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: apply, setParameter
    } 
 
    @Override 
    public void process(Photo src, Photo dst) {
        Effect effect = getEffect(EffectFactory.EFFECT_DUOTONE);
        effect.setParameter("first_color", firstColor);
        effect.setParameter("second_color", secondColor);
        effect.apply(src.texture(), src.width(), src.height(), dst.texture());
    } 
 
    @Override 
    protected void writeToParcel(Parcel out) {
        out.writeInt(firstColor);
        out.writeInt(secondColor);
    } 
 
    @Override 
    protected void readFromParcel(Parcel in) {
        firstColor = in.readInt();
        secondColor = in.readInt();
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Android Effect Methods: