- java.lang.Object
- 
- javafx.scene.effect.Effect
- 
- javafx.scene.effect.PerspectiveTransform
 
 
- 
 public class PerspectiveTransform extends Effect An effect that provides non-affine transformation of the input content. Most typicallyPerspectiveTransformis used to provide a "faux" three-dimensional effect for otherwise two-dimensional content.A perspective transformation is capable of mapping an arbitrary quadrilateral into another arbitrary quadrilateral, while preserving the straightness of lines. Unlike an affine transformation, the parallelism of lines in the source is not necessarily preserved in the output. Note that this effect does not adjust the coordinates of input events or any methods that measure containment on a Node. The results of mouse picking and the containment methods are undefined when aNodehas aPerspectiveTransformeffect in place.Example: PerspectiveTransform perspectiveTrasform = new PerspectiveTransform(); perspectiveTrasform.setUlx(10.0); perspectiveTrasform.setUly(10.0); perspectiveTrasform.setUrx(310.0); perspectiveTrasform.setUry(40.0); perspectiveTrasform.setLrx(310.0); perspectiveTrasform.setLry(60.0); perspectiveTrasform.setLlx(10.0); perspectiveTrasform.setLly(90.0); Group g = new Group(); g.setEffect(perspectiveTrasform); g.setCache(true); Rectangle rect = new Rectangle(); rect.setX(10.0); rect.setY(10.0); rect.setWidth(280.0); rect.setHeight(80.0); rect.setFill(Color.web("0x3b596d")); Text text = new Text(); text.setX(20.0); text.setY(65.0); text.setText("Perspective"); text.setFill(Color.ALICEBLUE); text.setFont(Font.font(null, FontWeight.BOLD, 36)); g.getChildren().addAll(rect, text);The code above produces the following:   - Since:
- JavaFX 2.0
 
- 
- 
Property SummaryProperties Type Property Description ObjectProperty<Effect>inputThe input for thisEffect.DoublePropertyllxThe x coordinate of the output location onto which the lower left corner of the source is mapped.DoublePropertyllyThe y coordinate of the output location onto which the lower left corner of the source is mapped.DoublePropertylrxThe x coordinate of the output location onto which the lower right corner of the source is mapped.DoublePropertylryThe y coordinate of the output location onto which the lower right corner of the source is mapped.DoublePropertyulxThe x coordinate of the output location onto which the upper left corner of the source is mapped.DoublePropertyulyThe y coordinate of the output location onto which the upper left corner of the source is mapped.DoublePropertyurxThe x coordinate of the output location onto which the upper right corner of the source is mapped.DoublePropertyuryThe y coordinate of the output location onto which the upper right corner of the source is mapped.
 - 
Constructor SummaryConstructors Constructor Description PerspectiveTransform()Creates a new instance of PerspectiveTransform with default parameters.PerspectiveTransform(double ulx, double uly, double urx, double ury, double lrx, double lry, double llx, double lly)Creates a new instance of PerspectiveTransform with the specified ulx, uly, urx, ury, lrx, lry, llx, and lly.
 - 
Method SummaryModifier and Type Method Description EffectgetInput()Gets the value of the property input.doublegetLlx()Gets the value of the property llx.doublegetLly()Gets the value of the property lly.doublegetLrx()Gets the value of the property lrx.doublegetLry()Gets the value of the property lry.doublegetUlx()Gets the value of the property ulx.doublegetUly()Gets the value of the property uly.doublegetUrx()Gets the value of the property urx.doublegetUry()Gets the value of the property ury.ObjectProperty<Effect>inputProperty()The input for thisEffect.DoublePropertyllxProperty()The x coordinate of the output location onto which the lower left corner of the source is mapped.DoublePropertyllyProperty()The y coordinate of the output location onto which the lower left corner of the source is mapped.DoublePropertylrxProperty()The x coordinate of the output location onto which the lower right corner of the source is mapped.DoublePropertylryProperty()The y coordinate of the output location onto which the lower right corner of the source is mapped.voidsetInput(Effect value)Sets the value of the property input.voidsetLlx(double value)Sets the value of the property llx.voidsetLly(double value)Sets the value of the property lly.voidsetLrx(double value)Sets the value of the property lrx.voidsetLry(double value)Sets the value of the property lry.voidsetUlx(double value)Sets the value of the property ulx.voidsetUly(double value)Sets the value of the property uly.voidsetUrx(double value)Sets the value of the property urx.voidsetUry(double value)Sets the value of the property ury.DoublePropertyulxProperty()The x coordinate of the output location onto which the upper left corner of the source is mapped.DoublePropertyulyProperty()The y coordinate of the output location onto which the upper left corner of the source is mapped.DoublePropertyurxProperty()The x coordinate of the output location onto which the upper right corner of the source is mapped.DoublePropertyuryProperty()The y coordinate of the output location onto which the upper right corner of the source is mapped.
 
- 
- 
- 
Property Detail- 
inputpublic final ObjectProperty<Effect> inputProperty The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- See Also:
- getInput(),- setInput(Effect)
 
 - 
ulxpublic final DoubleProperty ulxProperty The x coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUlx(),- setUlx(double)
 
 - 
ulypublic final DoubleProperty ulyProperty The y coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUly(),- setUly(double)
 
 - 
urxpublic final DoubleProperty urxProperty The x coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUrx(),- setUrx(double)
 
 - 
urypublic final DoubleProperty uryProperty The y coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUry(),- setUry(double)
 
 - 
lrxpublic final DoubleProperty lrxProperty The x coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLrx(),- setLrx(double)
 
 - 
lrypublic final DoubleProperty lryProperty The y coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLry(),- setLry(double)
 
 - 
llxpublic final DoubleProperty llxProperty The x coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLlx(),- setLlx(double)
 
 - 
llypublic final DoubleProperty llyProperty The y coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLly(),- setLly(double)
 
 
- 
 - 
Constructor Detail- 
PerspectiveTransformpublic PerspectiveTransform() Creates a new instance of PerspectiveTransform with default parameters.
 - 
PerspectiveTransformpublic PerspectiveTransform(double ulx, double uly, double urx, double ury, double lrx, double lry, double llx, double lly)Creates a new instance of PerspectiveTransform with the specified ulx, uly, urx, ury, lrx, lry, llx, and lly.- Parameters:
- ulx- the x coordinate of upper left corner
- uly- the y coordinate of upper left corner
- urx- the x coordinate of upper right corner
- ury- the y coordinate of upper right corner
- lrx- the x coordinate of lower right corner
- lry- the y coordinate of lower right corner
- llx- the x coordinate of lower left corner
- lly- the y coordinate of lower left corner
- Since:
- JavaFX 2.1
 
 
- 
 - 
Method Detail- 
setInputpublic final void setInput(Effect value) Sets the value of the property input.- Property description:
- The input for this Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
 
 - 
getInputpublic final Effect getInput() Gets the value of the property input.- Property description:
- The input for this Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
 
 - 
inputPropertypublic final ObjectProperty<Effect> inputProperty() The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- See Also:
- getInput(),- setInput(Effect)
 
 - 
setUlxpublic final void setUlx(double value) Sets the value of the property ulx.- Property description:
- The x coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getUlxpublic final double getUlx() Gets the value of the property ulx.- Property description:
- The x coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
ulxPropertypublic final DoubleProperty ulxProperty() The x coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUlx(),- setUlx(double)
 
 - 
setUlypublic final void setUly(double value) Sets the value of the property uly.- Property description:
- The y coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getUlypublic final double getUly() Gets the value of the property uly.- Property description:
- The y coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
ulyPropertypublic final DoubleProperty ulyProperty() The y coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUly(),- setUly(double)
 
 - 
setUrxpublic final void setUrx(double value) Sets the value of the property urx.- Property description:
- The x coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getUrxpublic final double getUrx() Gets the value of the property urx.- Property description:
- The x coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
urxPropertypublic final DoubleProperty urxProperty() The x coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUrx(),- setUrx(double)
 
 - 
setUrypublic final void setUry(double value) Sets the value of the property ury.- Property description:
- The y coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getUrypublic final double getUry() Gets the value of the property ury.- Property description:
- The y coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
uryPropertypublic final DoubleProperty uryProperty() The y coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getUry(),- setUry(double)
 
 - 
setLrxpublic final void setLrx(double value) Sets the value of the property lrx.- Property description:
- The x coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getLrxpublic final double getLrx() Gets the value of the property lrx.- Property description:
- The x coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
lrxPropertypublic final DoubleProperty lrxProperty() The x coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLrx(),- setLrx(double)
 
 - 
setLrypublic final void setLry(double value) Sets the value of the property lry.- Property description:
- The y coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getLrypublic final double getLry() Gets the value of the property lry.- Property description:
- The y coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
 
 - 
lryPropertypublic final DoubleProperty lryProperty() The y coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLry(),- setLry(double)
 
 - 
setLlxpublic final void setLlx(double value) Sets the value of the property llx.- Property description:
- The x coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getLlxpublic final double getLlx() Gets the value of the property llx.- Property description:
- The x coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
llxPropertypublic final DoubleProperty llxProperty() The x coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLlx(),- setLlx(double)
 
 - 
setLlypublic final void setLly(double value) Sets the value of the property lly.- Property description:
- The y coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
getLlypublic final double getLly() Gets the value of the property lly.- Property description:
- The y coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
 
 - 
llyPropertypublic final DoubleProperty llyProperty() The y coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- See Also:
- getLly(),- setLly(double)
 
 
- 
 
-