|
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.Stroke
public final class Stroke
A edge Stroke filter.
An example can be found here: http://www.webdesign.org/web/photoshop/photoshop-basics/stroke-a-stroke-in-photoshop.14342.html Example of use (to obtain the same effect as the above PSD example):
ImageSprite sprite = new ImageSprite("star.png", 50, 50);
FilterChain chain = new FilterChain(new Stroke(0xff289acd, 7), new Stroke(0xFF00679A, 7));
sprite.setFilter(chain);
add(sprite);
| Field Summary | |
|---|---|
Color |
color
The stroke color. |
Int |
size
The stroke size. |
| Constructor Summary | |
|---|---|
Stroke()
Creates a Stroke filter with the default color (black) and a size of 5. |
|
Stroke(int color)
Creates a Stroke filter with the specified color and a size of 5. |
|
Stroke(int color,
int radius)
Creates a Stroke filter with the specified color and size. |
|
| 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. |
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 |
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 Color color
public final Int size
| Constructor Detail |
|---|
public Stroke()
public Stroke(int color)
public Stroke(int color,
int radius)
| Method Detail |
|---|
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 boolean isOpaque()
Filter
isOpaque 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 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 | |||||||||