Code example for Effect

Methods: apply, setParameter

0
    } 
 
    @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);
    } 
}