Spec-Zone .ru
спецификации, руководства, описания, API

JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

Overview

Represents a distant light source.

the code:

import javafx.scene.*;
import javafx.scene.effect.*;
import javafx.scene.effect.light.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.scene.text.*;

Group {
    var t:Text;
    content: [
        Rectangle {
            width: bind t.layoutBounds.width+30
            height: bind t.layoutBounds.height+20
            fill: Color.BLACK
        },
        t = Text {
            effect: Lighting {
                light: DistantLight { azimuth: -135 elevation: 30 }
                surfaceScale: 5
            }
            textOrigin: TextOrigin.TOP
            x: 10 y: 10
            content: "DistantLight"
            fill: Color.RED
            font: Font.font(null, FontWeight.BOLD, 90);
        }
    ]
}

produces:

Profile: common conditional effect

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicazimuthNumber45.0

The azimuth of the light.

The azimuth of the light. The azimuth is the direction angle for the light source on the XY plane, in degrees.

       Min:  n/a
       Max:  n/a
   Default: 45.0
  Identity:  n/a
 

45.0  
publicelevationNumber45.0

The elevation of the light.

The elevation of the light. The elevation is the direction angle for the light source on the YZ plane, in degrees.

       Min:  n/a
       Max:  n/a
   Default: 45.0
  Identity:  n/a
 

45.0  

Inherited Variables

javafx.scene.effect.light.Light

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publiccolorColorWHITE

The color of the light source.

The color of the light source.

       Min: n/a
       Max: n/a
   Default: Color.WHITE
  Identity: n/a
 

WHITE  

Function Summary

Inherited Functions

javafx.scene.effect.light.Light