PulpCore

pulpcore.image.filter
Class Identity

java.lang.Object
  extended by pulpcore.image.filter.Filter
      extended by pulpcore.image.filter.Identity

public class Identity
extends Filter

A no-op filter: The output pixels are copied from the input.


Constructor Summary
Identity()
           
 
Method Summary
 Filter copy()
          Creates a copy of the Filter for another Sprite to use.
protected  void filter(CoreImage input, CoreImage output)
          Performs this filter on the input image onto the specified output image.
 
Methods inherited from class pulpcore.image.filter.Filter
filter, getHeight, getInput, getOutput, getWidth, getX, getY, isDirty, isOpaque, setDirty, setInput, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Identity

public Identity()
Method Detail

filter

protected void filter(CoreImage input,
                      CoreImage output)
Description copied from class: Filter
Performs this filter on the input image onto the specified output image.

This method is called from Filter.getOutput() if Filter.isDirty() returns true. The output image will be the same dimensions as (Filter.getWidth() x Filter.getHeight(). Implementors must ensure that every pixel in output is drawn.

Specified by:
filter in class Filter

copy

public Filter copy()
Description copied from class: Filter
Creates a copy of the Filter for another Sprite to use. The input filter is also copied. The properties of the copy, if any, will be bound to the original filter's properties.

This method is used by the Sprite class. Most apps will not need to call this method.

Subclasses should bind all properties of the cloned object using bindWithInverse(). For example, for the HSBAdjust filter:

        public Filter copy() {
            HSBAdjust copy = new HSBAdjust();
            copy.hue.bindWithInverse(hue);
            copy.brightness.bindWithInverse(brightness);
            copy.saturation.bindWithInverse(saturation);
            return copy;
        }
        

Specified by:
copy in class Filter

PulpCore

Copyright © 2007-2009 Interactive Pulp, LLC.