Class Light.Distant

java.lang.Object
javafx.scene.effect.Light
javafx.scene.effect.Light.Distant
Enclosing class:
Light

public static class Light.Distant extends Light
Represents a distant light source.

Example:


 Light.Distant light = new Light.Distant();
 light.setAzimuth(45.0);
 light.setElevation(30.0);

 Lighting lighting = new Lighting();
 lighting.setLight(light);
 lighting.setSurfaceScale(5.0);

 Text text = new Text();
 text.setText("Distant");
 text.setFill(Color.STEELBLUE);
 text.setFont(Font.font("null", FontWeight.BOLD, 80));
 text.setX(10.0f);
 text.setY(10.0f);
 text.setTextOrigin(VPos.TOP);
 text.setEffect(lighting);

 Rectangle rect = new Rectangle(300,150);
 rect.setFill(Color.ALICEBLUE);
 rect.setEffect(lighting);
 

The code above produces the following:

The visual effect of distant
 Light on text

Since:
JavaFX 2.0