|
PulpCore | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpulpcore.image.filter.Filter
pulpcore.image.filter.Blur
public class Blur
A blur filter.
For an opaque input image (for example, a photo), the output image has the same dimensions as the input. For a non-opaque input image, the output image is expanded to show the complete blur.
| Field Summary | |
|---|---|
Int |
quality
The number of times to perform the blur. |
Fixed |
radius
The blur radius. |
| Constructor Summary | |
|---|---|
Blur()
Creates a blur filter with a radius of 4 and a quality of 1. |
|
Blur(Blur filter)
Copy constructor. |
|
Blur(float radius)
Creates a blur filter with the specified radius, from 0 (no blur) to 255, and a quality of 1. |
|
Blur(float radius,
int quality)
Creates a blur filter with the specified radius, from 0 (no blur) to 255, and the specified quality, typically from 1 (default) to 3 (Guassian approximation). |
|
| 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. |
protected void |
filter(CoreImage input,
CoreImage output,
int shiftX,
int shiftY,
boolean clamp)
|
boolean |
getClampEdges()
Gets whether the edges of the output is clamped (sharp edges). |
int |
getHeight()
Gets the height of the output of this filter. |
int |
getWidth()
Gets the width of the output of this filter. |
int |
getX()
Gets the x offset the output image should display relative to the input. |
int |
getY()
Gets the y offset the output image should display relative to the input. |
boolean |
isOpaque()
Returns true if the output of this filter is opaque. |
void |
setClampEdges(boolean clamp)
Sets whether the edges of the output is clamped (sharp edges). |
void |
update(int elapsedTime)
Updates the filter. |
| Methods inherited from class pulpcore.image.filter.Filter |
|---|
filter, getInput, getOutput, 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 Fixed radius
public final Int quality
| Constructor Detail |
|---|
public Blur()
public Blur(float radius)
public Blur(float radius,
int quality)
public Blur(Blur filter)
copy().
| Method Detail |
|---|
public void setClampEdges(boolean clamp)
getClampEdges()public boolean getClampEdges()
setClampEdges(boolean)public Filter copy()
FilterThis 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 Filterpublic void update(int elapsedTime)
Filter
update in class Filterpublic int getX()
Filter
getX in class Filterpublic int getY()
Filter
getY in class Filterpublic int getWidth()
Filter
getWidth in class Filterpublic int getHeight()
Filter
getHeight in class Filterpublic boolean isOpaque()
Filter
isOpaque in class Filter
protected void filter(CoreImage input,
CoreImage output)
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
protected void filter(CoreImage input,
CoreImage output,
int shiftX,
int shiftY,
boolean clamp)
|
PulpCore | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||