public class Lighting extends Effect
Example:
Light.Distant light = new Light.Distant();
light.setAzimuth(-135.0);
Lighting lighting = new Lighting();
lighting.setLight(light);
lighting.setSurfaceScale(5.0);
Text text = new Text();
text.setText("JavaFX!");
text.setFill(Color.STEELBLUE);
text.setFont(Font.font(null, FontWeight.BOLD, 60));
text.setX(10.0);
text.setY(10.0);
text.setTextOrigin(VPos.TOP);
text.setEffect(lighting);
The code above produces the following:
Constructor and Description |
---|
Lighting()
Creates a new instance of Lighting with default parameters.
|
Lighting(Light light)
Creates a new instance of Lighting with the specified light.
|
impl_effectDirtyProperty, impl_getImpl, impl_isEffectDirty, impl_sync
public Lighting()
public Lighting(Light light)
light
- the light source for this Lighting
effectpublic final void setLight(Light value)
public final Light getLight()
public final ObjectProperty<Light> lightProperty()
@Deprecated public Effect impl_copy()
public final void setBumpInput(Effect value)
public final Effect getBumpInput()
public final ObjectProperty<Effect> bumpInputProperty()
public final void setContentInput(Effect value)
public final Effect getContentInput()
public final ObjectProperty<Effect> contentInputProperty()
public final void setDiffuseConstant(double value)
public final double getDiffuseConstant()
public final DoubleProperty diffuseConstantProperty()
public final void setSpecularConstant(double value)
public final double getSpecularConstant()
public final DoubleProperty specularConstantProperty()
public final void setSpecularExponent(double value)
public final double getSpecularExponent()
public final DoubleProperty specularExponentProperty()
public final void setSurfaceScale(double value)
public final double getSurfaceScale()
public final DoubleProperty surfaceScaleProperty()
@Deprecated public BaseBounds impl_getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect
impl_getBounds
in class Effect
Copyright © 2020. All rights reserved.