public class GeneralShadow extends DelegateEffect
Effect.AccelType
DefaultInput
Constructor and Description |
---|
GeneralShadow()
Constructs a new
GeneralShadow effect, with the default
blur radius (10.0), using the default input for source data. |
GeneralShadow(Effect input)
Constructs a new
GeneralShadow effect, with the default
blur radius (10.0). |
Modifier and Type | Method and Description |
---|---|
Color4f |
getColor()
Returns the shadow color.
|
protected Effect |
getDelegate()
Returns the
Effect object to delegate all operations to. |
float |
getGaussianHeight() |
float |
getGaussianRadius() |
float |
getGaussianWidth() |
Effect |
getInput()
Returns the shadow source input for this
Effect . |
float |
getRadius()
Returns the radius of the Gaussian kernel.
|
AbstractShadow.ShadowMode |
getShadowMode() |
float |
getSpread()
Gets the spread of the shadow effect.
|
void |
setColor(Color4f color)
Sets the shadow color.
|
void |
setGaussianHeight(float h) |
void |
setGaussianRadius(float r) |
void |
setGaussianWidth(float w) |
void |
setInput(Effect input)
Sets the shadow source input for this
Effect . |
void |
setRadius(float radius)
Sets the radius of the shadow blur kernel.
|
void |
setShadowMode(AbstractShadow.ShadowMode mode) |
void |
setSpread(float spread)
Sets the spread of the shadow effect.
|
filter, getAccelType, getBounds, getDirtyRegions, reducesOpaquePixels, transform, untransform
combineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getInputs, getNumInputs, getResultBounds, releaseCompatibleImage, setInput, transformBounds
public GeneralShadow()
GeneralShadow
effect, with the default
blur radius (10.0), using the default input for source data.
This is a shorthand equivalent to:
new GeneralShadow(DefaultInput)
public GeneralShadow(Effect input)
GeneralShadow
effect, with the default
blur radius (10.0).
This constructor is intended for advanced developers only. Most developers will only ever need to use the default constructor.
input
- the input Effect
used to create the shadowpublic AbstractShadow.ShadowMode getShadowMode()
public void setShadowMode(AbstractShadow.ShadowMode mode)
protected Effect getDelegate()
DelegateEffect
Effect
object to delegate all operations to.getDelegate
in class DelegateEffect
Effect
object to delegate to.public final Effect getInput()
Effect
.Effect
public void setInput(Effect input)
Effect
.input
- the shadow source input for this Effect
IllegalArgumentException
- if input
is nullpublic float getRadius()
public void setRadius(float radius)
Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
radius
- the radius of the shadow blur kernelIllegalArgumentException
- if radius
is outside the
allowable rangepublic float getGaussianRadius()
public float getGaussianWidth()
public float getGaussianHeight()
public void setGaussianRadius(float r)
public void setGaussianWidth(float w)
public void setGaussianHeight(float h)
public float getSpread()
public void setSpread(float spread)
0.0
will result in a pure Gaussian distribution
of the shadow.
A spread of 1.0
will result in a solid growth outward of the
source material opacity to the limit of the radius with a very sharp
cutoff to transparency at the radius.
Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0
spread
- the spread of the shadow effectIllegalArgumentException
- if spread
is outside the
allowable rangepublic Color4f getColor()
public void setColor(Color4f color)
Min: n/a Max: n/a Default: Color4f.BLACK Identity: n/a
color
- the shadow colorIllegalArgumentException
- if color
is nullCopyright © 2020. All rights reserved.