|
PulpCore | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pulpcore.image.filter.Filter pulpcore.image.filter.Reflection
public final class Reflection
A Reflection filter. Fake a mirrored image on brilliant surface.
Field Summary | |
---|---|
Int |
bottomAlpha
The alpha of the bottom of the reflection (farthest from from the bottom of the image), from 0 to 255. |
Fixed |
fraction
The reflection height as a fraction of the input image, from 0 to 1. |
Int |
gap
The vertical gap, in pixels, between the bottom of the image and the top of the reflection. |
Int |
topAlpha
The alpha of the top of the reflection (nearest the bottom of the image), from 0 to 255. |
Constructor Summary | |
---|---|
Reflection()
Creates a Reflection filter with the default parameters. |
|
Reflection(int gap)
Creates a Reflection filter with the specified gap. |
|
Reflection(int gap,
float fraction)
Creates a Reflection filter with the specified gap and reflection height (as a fraction of the input image). |
|
Reflection(int gap,
float fraction,
int topAlpha,
int bottomAlpha)
Creates a Reflection filter with the specified gap, (as a fraction of the input image), and alpha values. |
Method Summary | |
---|---|
Filter |
copy()
Creates a copy of the Filter for another Sprite to use. |
protected void |
filter(CoreImage src,
CoreImage dst)
Performs this filter on the input image onto the specified output image. |
int |
getHeight()
Gets the height of the output of this filter. |
boolean |
isOpaque()
Returns true if the output of this filter is opaque. |
void |
update(int elapsedTime)
Updates the filter. |
Methods inherited from class pulpcore.image.filter.Filter |
---|
filter, getInput, getOutput, getWidth, getX, getY, isDirty, setDirty, setInput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Int gap
public final Fixed fraction
public final Int topAlpha
public final Int bottomAlpha
Constructor Detail |
---|
public Reflection()
public Reflection(int gap)
public Reflection(int gap, float fraction)
public Reflection(int gap, float fraction, int topAlpha, int bottomAlpha)
Method Detail |
---|
public Filter copy()
Filter
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; }
copy
in class Filter
public int getHeight()
Filter
getHeight
in class Filter
public boolean isOpaque()
Filter
isOpaque
in class Filter
public void update(int elapsedTime)
Filter
update
in class Filter
protected void filter(CoreImage src, CoreImage dst)
Filter
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.
filter
in class Filter
|
PulpCore | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |