public class GaussianShadow extends AbstractShadow
AbstractShadow.ShadowModeEffect.AccelType| Modifier and Type | Field and Description |
|---|---|
private GaussianShadowState |
state |
DefaultInput| Constructor and Description |
|---|
GaussianShadow()
Constructs a new
GaussianShadow effect with the default radius
(10.0) and the default color (Color4f.BLACK), using the
default input for source data. |
GaussianShadow(float radius)
Constructs a new
GaussianShadow effect with the given radius
and the default color (Color4f.BLACK), using the
default input for source data. |
GaussianShadow(float radius,
Color4f color)
Constructs a new
GaussianShadow effect with the given radius
and color, using the default input for source data. |
GaussianShadow(float radius,
Color4f color,
Effect input)
Constructs a new
GaussianShadow effect with the given
radius and color. |
| Modifier and Type | Method and Description |
|---|---|
Effect.AccelType |
getAccelType(FilterContext fctx)
Returns one of the
AccelType values, indicating
whether this Effect is accelerated in hardware for the
given FilterContext. |
BaseBounds |
getBounds(BaseTransform transform,
Effect defaultInput)
Returns the bounding box that will be affected by this filter
operation when viewed under the specified
transform,
given its list of input Effects and the specified
defaultInput effect. |
Color4f |
getColor()
Returns the shadow color.
|
DirtyRegionContainer |
getDirtyRegions(Effect defaultInput,
DirtyRegionPool regionPool)
Returns the dirty region container containing dirty regions affected
by this filter operation.
|
float |
getGaussianHeight() |
float |
getGaussianRadius() |
float |
getGaussianWidth() |
float |
getHRadius()
Returns the horizontal radius of the Gaussian kernel.
|
Effect |
getInput()
Returns the input for this
Effect. |
AbstractShadow.ShadowMode |
getMode() |
float |
getRadius()
Returns the radius of the Gaussian kernel.
|
Rectangle |
getResultBounds(BaseTransform transform,
Rectangle outputClip,
ImageData... inputDatas) |
float |
getSpread()
Gets the spread of the shadow effect.
|
(package private) LinearConvolveKernel |
getState()
Returns state object that is associated with this effect instance.
|
float |
getVRadius()
Returns the vertical radius of the Gaussian kernel.
|
AbstractShadow |
implFor(AbstractShadow.ShadowMode mode) |
boolean |
reducesOpaquePixels()
Whether an opacity for any pixel is different (lower)
than the corresponding pixel in the default input.
|
void |
setColor(Color4f color)
Sets the shadow color.
|
void |
setGaussianHeight(float h) |
void |
setGaussianRadius(float r) |
void |
setGaussianWidth(float w) |
void |
setHRadius(float hradius)
Sets the horizontal radius of the Gaussian kernel.
|
void |
setInput(Effect input)
Sets the input for this
Effect to a specific Effect
or to the default input if input is null. |
void |
setRadius(float radius)
Sets the radius of the Gaussian kernel.
|
void |
setSpread(float spread)
Sets the spread of the shadow effect.
|
void |
setVRadius(float vradius)
Sets the vertical radius of the Gaussian kernel.
|
filterImageDatas, getRenderStategetPeer, updatePeerKey, updatePeerKeyfilter, transform, untransform, untransformClipcombineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getDefaultedInput, getDefaultedInput, getInputs, getNumInputs, releaseCompatibleImage, setInput, transformBoundsprivate GaussianShadowState state
public GaussianShadow()
GaussianShadow effect with the default radius
(10.0) and the default color (Color4f.BLACK), using the
default input for source data.
This is a shorthand equivalent to:
new GaussianShadow(10f, Color4f.BLACK, DefaultInput)
public GaussianShadow(float radius)
GaussianShadow effect with the given radius
and the default color (Color4f.BLACK), using the
default input for source data.
This is a shorthand equivalent to:
new GaussianShadow(radius, Color4f.BLACK, DefaultInput)
radius - the radius of the Gaussian kerneljava.lang.IllegalArgumentException - if radius is outside the
allowable rangepublic GaussianShadow(float radius,
Color4f color)
GaussianShadow effect with the given radius
and color, using the default input for source data.
This is a shorthand equivalent to:
new GaussianShadow(radius, color, DefaultInput)
radius - the radius of the Gaussian kernelcolor - the shadow Color4fjava.lang.IllegalArgumentException - if radius is outside the
allowable rangepublic GaussianShadow(float radius,
Color4f color,
Effect input)
GaussianShadow effect with the given
radius and color.radius - the radius of the Gaussian kernelcolor - the shadow Color4finput - the single input Effectjava.lang.IllegalArgumentException - if radius is outside the
allowable range, or if color is nullLinearConvolveKernel getState()
EffectgetState in class LinearConvolveCoreEffectpublic Effect.AccelType getAccelType(FilterContext fctx)
EffectAccelType values, indicating
whether this Effect is accelerated in hardware for the
given FilterContext.getAccelType in class CoreEffect<LinearConvolveRenderState>AccelType valuespublic final Effect getInput()
Effect.getInput in class AbstractShadowEffectpublic void setInput(Effect input)
Effect to a specific Effect
or to the default input if input is null.setInput in class AbstractShadowinput - the input for this Effectpublic float getRadius()
public void setRadius(float radius)
Min: 0.0
Max: 127.0
Default: 10.0
Identity: 0.0
radius - the radius of the Gaussian kerneljava.lang.IllegalArgumentException - if radius is outside the
allowable rangepublic float getHRadius()
public void setHRadius(float hradius)
Min: 0.0
Max: 127.0
Default: 10.0
Identity: 0.0
hradius - the horizontal radius of the Gaussian kerneljava.lang.IllegalArgumentException - if radius is outside the
allowable rangepublic float getVRadius()
public void setVRadius(float vradius)
Min: 0.0
Max: 127.0
Default: 10.0
Identity: 0.0
vradius - the vertical radius of the Gaussian kerneljava.lang.IllegalArgumentException - if radius is outside the
allowable rangepublic float getSpread()
getSpread in class AbstractShadowpublic 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
setSpread in class AbstractShadowspread - the spread of the shadow effectjava.lang.IllegalArgumentException - if spread is outside the
allowable rangepublic Color4f getColor()
getColor in class AbstractShadowpublic void setColor(Color4f color)
Min: n/a
Max: n/a
Default: Color4f.BLACK
Identity: n/a
setColor in class AbstractShadowcolor - the shadow colorjava.lang.IllegalArgumentException - if color is nullpublic float getGaussianRadius()
getGaussianRadius in class AbstractShadowpublic float getGaussianWidth()
getGaussianWidth in class AbstractShadowpublic float getGaussianHeight()
getGaussianHeight in class AbstractShadowpublic void setGaussianRadius(float r)
setGaussianRadius in class AbstractShadowpublic void setGaussianWidth(float w)
setGaussianWidth in class AbstractShadowpublic void setGaussianHeight(float h)
setGaussianHeight in class AbstractShadowpublic AbstractShadow.ShadowMode getMode()
getMode in class AbstractShadowpublic AbstractShadow implFor(AbstractShadow.ShadowMode mode)
implFor in class AbstractShadowpublic BaseBounds getBounds(BaseTransform transform, Effect defaultInput)
Effecttransform,
given its list of input Effects and the specified
defaultInput effect.
Note that the returned bounds can be smaller or larger than one
or more of the inputs.getBounds in class FilterEffect<LinearConvolveRenderState>transform - the transform the effect will be viewed underdefaultInput - the default input Effect to be used in
all cases where a filter has a null inputpublic Rectangle getResultBounds(BaseTransform transform, Rectangle outputClip, ImageData... inputDatas)
getResultBounds in class Effectpublic boolean reducesOpaquePixels()
EffectreducesOpaquePixels in class Effectpublic DirtyRegionContainer getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool)
EffectgetDirtyRegions in class EffectdefaultInput - the default input Effect to be used in
all cases where a filter has a null inputregionPool - the pool of dirty regions