public class CharcoalEffect extends Object
| Modifier and Type | Field and Description |
|---|---|
float |
angle
|
float |
maxDepth
|
int |
seed
|
float |
size
|
PathWriter |
writer
|
| Constructor and Description |
|---|
CharcoalEffect(PathWriter
Creates a new
CharcoalEffect.
|
CharcoalEffect(PathWriter
Creates a new
CharcoalEffect.
|
| Modifier and Type | Method and Description |
|---|---|
static GeneralPath |
filter(Shape
Applies the
CharcoalEffect to a shape.
|
static GeneralPath |
filter(Shape
Applies the
CharcoalEffect to a shape.
|
void |
write(Shape
Applies this effect to the shape provided.
|
public final PathWriterwriter
public final int seed
public final float size
public final float angle
public final float maxDepth
public CharcoalEffect(PathWriterdest, float size, float angle, int randomSeed)
CharcoalEffect.
dest - the destination to write the new shape to.
size - the size of the cracks. This is float from [0,1], where "0" means "no crack depth" and "1" means "high depth". The depth is always relative to the
possible depth.
angle - the angle of the cracks.
randomSeed - the random seed.
public CharcoalEffect(PathWriterdest, float size, float angle, int randomSeed, float maxDepth)
CharcoalEffect.
dest - the destination to write the new shape to.
size - the size of the cracks. This is float from [0,1], where "0" means "no crack depth" and "1" means "high depth". The depth is always relative to the
possible depth.
angle - the angle of the cracks.
randomSeed - the random seed.
maxDepth - this is the maximum crack depth. If this is zero, then no cracks will be added. If this is 5, then cracks will be at most 5 pixels. If you aren't sure what to make this value, use
Float.MAX_VALUE.
public static GeneralPathfilter(Shape shape, float size, float angle, int randomSeed, float maxDepth)
CharcoalEffect to a shape.
shape - the shape to apply the effect to.
size - the size of the cracks. This is float from [0,1], where "0" means "no crack depth" and "1" means "high depth". The depth is always relative to the
possible depth.
angle - the angle of the cracks.
randomSeed - the random seed.
maxDepth - this is the maximum crack depth. If this is zero, then no cracks will be added. If this is 5, then cracks will be at most 5 pixels. If you aren't sure what to make this value, use
Float.MAX_VALUE.
public static GeneralPathfilter(Shape shape, float size, float angle, int randomSeed)
CharcoalEffect to a shape.
shape - the shape to apply the effect to.
size - the size of the cracks. This is float from [0,1], where "0" means "no crack depth" and "1" means "high depth". The depth is always relative to the
possible depth.
angle - the angle of the cracks.
randomSeed - the random seed.
public void write(Shapes)
s - the shape to write.