public class BoxBlur extends Effect
Example:
BoxBlur boxBlur = new BoxBlur();
boxBlur.setWidth(10);
boxBlur.setHeight(3);
boxBlur.setIterations(3);
Text text = new Text();
text.setText("Blurry Text!");
text.setFill(Color.web("0x3b596d"));
text.setFont(Font.font(null, FontWeight.BOLD, 50));
text.setX(10);
text.setY(50);
text.setEffect(boxBlur);
The code above produces the following:
Effect.EffectInputChangeListener, Effect.EffectInputProperty
Modifier and Type | Field and Description |
---|---|
private DoubleProperty |
height
The vertical dimension of the blur effect.
|
private ObjectProperty<Effect> |
input
The input for this
Effect . |
private IntegerProperty |
iterations
The number of times to iterate the blur effect to improve its
"quality" or "smoothness".
|
private DoubleProperty |
width
The horizontal dimension of the blur effect.
|
Constructor and Description |
---|
BoxBlur()
Creates a new instance of BoxBlur with default parameters.
|
BoxBlur(double width,
double height,
int iterations)
Creates a new instance of BoxBlur with specified width, height and
iterations.
|
Modifier and Type | Method and Description |
---|---|
private int |
getClampedHeight() |
private int |
getClampedIterations() |
private int |
getClampedWidth() |
double |
getHeight() |
Effect |
getInput() |
int |
getIterations() |
double |
getWidth() |
DoubleProperty |
heightProperty() |
(package private) boolean |
impl_checkChainContains(Effect e) |
Effect |
impl_copy()
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
(package private) BoxBlur |
impl_createImpl() |
BaseBounds |
impl_getBounds(BaseBounds bounds,
BaseTransform tx,
Node node,
BoundsAccessor boundsAccessor)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
(package private) void |
impl_update() |
ObjectProperty<Effect> |
inputProperty() |
IntegerProperty |
iterationsProperty() |
void |
setHeight(double value) |
void |
setInput(Effect value) |
void |
setIterations(int value) |
void |
setWidth(double value) |
DoubleProperty |
widthProperty() |
effectBoundsChanged, getInputBounds, getKernelSize, getShadowBounds, impl_containsCycles, impl_effectDirtyProperty, impl_getImpl, impl_isEffectDirty, impl_sync, markDirty, transformBounds
private ObjectProperty<Effect> input
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.private DoubleProperty width
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
private DoubleProperty height
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
private IntegerProperty iterations
Min: 0 Max: 3 Default: 1 Identity: 0
public BoxBlur()
public BoxBlur(double width, double height, int iterations)
width
- the horizontal dimension of the blur effectheight
- the vertical dimension of the blur effectiterations
- the number of times to iterate the blur effect to
improve its "quality" or "smoothness"BoxBlur impl_createImpl()
impl_createImpl
in class Effect
public final void setInput(Effect value)
public final Effect getInput()
public final ObjectProperty<Effect> inputProperty()
boolean impl_checkChainContains(Effect e)
impl_checkChainContains
in class Effect
public final void setWidth(double value)
public final double getWidth()
public final DoubleProperty widthProperty()
public final void setHeight(double value)
public final double getHeight()
public final DoubleProperty heightProperty()
public final void setIterations(int value)
public final int getIterations()
public final IntegerProperty iterationsProperty()
private int getClampedWidth()
private int getClampedHeight()
private int getClampedIterations()
void impl_update()
impl_update
in class Effect
@Deprecated public BaseBounds impl_getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect
impl_getBounds
in class Effect