Code example for Effect

Methods: apply, setParameter

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