public class ShadowEffect extends Object implements ConfigurableEffect
ConfigurableEffect.Value
Modifier and Type | Field and Description |
---|---|
static float[][] |
GAUSSIAN_BLUR_KERNELS
The blur kernels applied across the effect
|
static int |
NUM_KERNELS
The numberof kernels to apply
|
Constructor and Description |
---|
ShadowEffect() |
ShadowEffect(Color color,
int xDistance,
int yDistance,
float opacity) |
Modifier and Type | Method and Description |
---|---|
void |
draw(BufferedImage image,
Graphics2D g,
UnicodeFont unicodeFont,
Glyph glyph)
Called to draw the effect.
|
int |
getBlurKernelSize() |
int |
getBlurPasses() |
Color |
getColor() |
float |
getOpacity() |
List |
getValues()
Returns the list of
ConfigurableEffect.Value s for this effect. |
float |
getXDistance() |
float |
getYDistance() |
void |
setBlurKernelSize(int blurKernelSize)
Sets how many neighboring pixels are used to blur the shadow.
|
void |
setBlurPasses(int blurPasses)
Sets the number of times to apply a blur to the shadow.
|
void |
setColor(Color color) |
void |
setOpacity(float opacity) |
void |
setValues(List values)
Sets the list of
ConfigurableEffect.Value s for this effect. |
void |
setXDistance(float distance)
Sets the pixels to offset the shadow on the x axis.
|
void |
setYDistance(float distance)
Sets the pixels to offset the shadow on the y axis.
|
String |
toString() |
public static final int NUM_KERNELS
public static final float[][] GAUSSIAN_BLUR_KERNELS
public ShadowEffect()
public ShadowEffect(Color color, int xDistance, int yDistance, float opacity)
public void draw(BufferedImage image, Graphics2D g, UnicodeFont unicodeFont, Glyph glyph)
Effect
public Color getColor()
public void setColor(Color color)
public float getXDistance()
public void setXDistance(float distance)
public float getYDistance()
public void setYDistance(float distance)
public int getBlurKernelSize()
public void setBlurKernelSize(int blurKernelSize)
public int getBlurPasses()
public void setBlurPasses(int blurPasses)
public float getOpacity()
public void setOpacity(float opacity)
public List getValues()
ConfigurableEffect
ConfigurableEffect.Value
s for this effect. This list is not typically backed by the effect, so changes to the
values will not take affect until ConfigurableEffect.setValues(List)
is called.getValues
in interface ConfigurableEffect
public void setValues(List values)
ConfigurableEffect
ConfigurableEffect.Value
s for this effect.setValues
in interface ConfigurableEffect
Copyright © 2014. All rights reserved.