Spec-Zone .ru
спецификации, руководства, описания, API
|
public static class Light.Point extends Light
Example:
Light.Point light = new Light.Point();
light.setX(100);
light.setY(100);
light.setZ(50);
Lighting lighting = new Lighting();
lighting.setLight(light);
lighting.setSurfaceScale(5.0);
Text text = new Text();
text.setText("Point");
text.setFill(Color.STEELBLUE);
text.setFont(Font.font(null, FontWeight.BOLD, 80));
text.setX(10.0);
text.setY(10.0);
text.setTextOrigin(VPos.TOP);
Rectangle rect = new Rectangle(250, 150);
rect.setFill(Color.ALICEBLUE);
rect.setEffect(lighting);
text.setEffect(lighting);
The code above produces the following:
Type | Property and Description |
---|---|
DoubleProperty |
x
The x coordinate of the light position.
|
DoubleProperty |
y
The y coordinate of the light position.
|
DoubleProperty |
z
The z coordinate of the light position.
|
Light.Distant, Light.Point, Light.Spot
Constructor and Description |
---|
Light.Point()
Creates a new instance of Point light with default parameters.
|
Light.Point(double x,
double y,
double z,
Color color)
Creates a new instance of Point light with the specified x, y, x, and
color.
|
Modifier and Type | Method and Description |
---|---|
double |
getX()
Gets the value of the property x.
|
double |
getY()
Gets the value of the property y.
|
double |
getZ()
Gets the value of the property z.
|
void |
setX(double value)
Sets the value of the property x.
|
void |
setY(double value)
Sets the value of the property y.
|
void |
setZ(double value)
Sets the value of the property z.
|
DoubleProperty |
xProperty()
The x coordinate of the light position.
|
DoubleProperty |
yProperty()
The y coordinate of the light position.
|
DoubleProperty |
zProperty()
The z coordinate of the light position.
|
colorProperty, getColor, setColor
public final DoubleProperty xProperty
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getX()
,
setX(double)
public final DoubleProperty yProperty
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getY()
,
setY(double)
public final DoubleProperty zProperty
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getZ()
,
setZ(double)
public Light.Point()
public Light.Point(double x, double y, double z, Color color)
x
- the x coordinate of the light positiony
- the y coordinate of the light positionz
- the z coordinate of the light positioncolor
- the color of the lightpublic final void setX(double value)
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final double getX()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final DoubleProperty xProperty()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getX()
,
setX(double)
public final void setY(double value)
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final double getY()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final DoubleProperty yProperty()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getY()
,
setY(double)
public final void setZ(double value)
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final double getZ()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public final DoubleProperty zProperty()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getZ()
,
setZ(double)
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to