public class Bloom extends DelegateEffect
Effect.AccelType
Modifier and Type | Field and Description |
---|---|
private Blend |
blend |
private GaussianBlur |
blur |
private Brightpass |
brightpass |
DefaultInput
Constructor and Description |
---|
Bloom()
Constructs a new
Bloom effect with the default threshold (0.3),
using the default input for source data. |
Bloom(Effect input)
Constructs a new
Bloom effect with the default threshold (0.3). |
Modifier and Type | Method and Description |
---|---|
protected Effect |
getDelegate()
Returns the
Effect object to delegate all operations to. |
Effect |
getInput()
Returns the input for this
Effect . |
float |
getThreshold()
Returns the threshold, which controls the intensity of the glow effect.
|
void |
setInput(Effect input)
Sets the input for this
Effect to a specific
Effect or to the default input if input is
null . |
void |
setThreshold(float threshold)
Sets the threshold, which controls the intensity of the glow effect.
|
Point2D |
transform(Point2D p,
Effect defaultInput)
Transform the specified point
p from the coordinate space
of the primary content input to the coordinate space of the effect
output. |
Point2D |
untransform(Point2D p,
Effect defaultInput)
Transform the specified point
p from the coordinate space
of the output of the effect into the coordinate space of the
primary content input. |
filter, getAccelType, getBounds, getDirtyRegions, reducesOpaquePixels
combineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getDefaultedInput, getDefaultedInput, getInputs, getNumInputs, getResultBounds, getState, releaseCompatibleImage, setInput, transformBounds
private final Brightpass brightpass
private final GaussianBlur blur
private final Blend blend
public Bloom()
Bloom
effect with the default threshold (0.3),
using the default input for source data.
This is a shorthand equivalent to:
new Bloom(DefaultInput)
public Bloom(Effect input)
Bloom
effect with the default threshold (0.3).input
- the single input Effect
or null
if the
default input should be usedprotected 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
to a specific
Effect
or to the default input if input
is
null
.input
- the input for this Effect
public float getThreshold()
public void setThreshold(float threshold)
Min: 0.0 Max: 1.0 Default: 0.3 Identity: n/a
threshold
- the threshold valuejava.lang.IllegalArgumentException
- if threshold
is outside
the allowable rangepublic Point2D transform(Point2D p, Effect defaultInput)
Effect
p
from the coordinate space
of the primary content input to the coordinate space of the effect
output.
In essence, this method asks the question "Which output coordinate
is most affected by the data at the specified coordinate in the
primary source input?"
The definition of which input represents the primary content input
and how the coordinate space of that input compares to the coordinate
space of the result varies from effect to effect.
Note that some effects may have a reasonable definition of how to
map source coordinates to destination coordinates, but not the
reverse.
In particular, effects which map source coordinates discontiguously
into the result may have several output coordinates that are affected
by a given input coordinate and may choose to return one of many
equally valid answers, or an undefined result such as NaN
,
or some other anomalous value.
Most effects perform simple transformations of the color of each
pixel and so represent an identity transform and return the point
unchanged.
transform
in class DelegateEffect
p
- the point in the coordinate space of the primary content
input to be transformeddefaultInput
- the default input Effect
to be used in
all cases where a filter has a null inputpublic Point2D untransform(Point2D p, Effect defaultInput)
Effect
p
from the coordinate space
of the output of the effect into the coordinate space of the
primary content input.
In essence, this method asks the question "Which source coordinate
contributes most to the definition of the output at the specified
coordinate?"
The definition of which input represents the primary content input
and how the coordinate space of that input compares to the coordinate
space of the result varies from effect to effect.
Note that some effects may have a reasonable definition of how to
map destination coordinates back to source coordinates, but not the
reverse.
In particular, effects which produce entirely synthetic results not
based on any content input may not be able to give a meaningful
result to this query and may return undefined coordinates such as
0
, Infinity
, or NaN
.
Most effects perform simple transformations of the color of each
pixel and so represent an identity transform and return the point
unchanged.
untransform
in class DelegateEffect
p
- the point in the coordinate space of the result output
to be transformeddefaultInput
- the default input Effect
to be used in
all cases where a filter has a null input