java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.PerspectiveTransform
An effect that provides non-affine transformation of the input content.
 Most typically 
PerspectiveTransform is 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 a Node has a PerspectiveTransform effect 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 SummaryPropertiesTypePropertyDescriptionfinal ObjectProperty<Effect>The input for thisEffect.final DoublePropertyThe x coordinate of the output location onto which the lower left corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the lower left corner of the source is mapped.final DoublePropertyThe x coordinate of the output location onto which the lower right corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the lower right corner of the source is mapped.final DoublePropertyThe x coordinate of the output location onto which the upper left corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the upper left corner of the source is mapped.final DoublePropertyThe x coordinate of the output location onto which the upper right corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the upper right corner of the source is mapped.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates 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 TypeMethodDescriptionfinal EffectgetInput()Gets the value of theinputproperty.final doublegetLlx()Gets the value of thellxproperty.final doublegetLly()Gets the value of thellyproperty.final doublegetLrx()Gets the value of thelrxproperty.final doublegetLry()Gets the value of thelryproperty.final doublegetUlx()Gets the value of theulxproperty.final doublegetUly()Gets the value of theulyproperty.final doublegetUrx()Gets the value of theurxproperty.final doublegetUry()Gets the value of theuryproperty.final ObjectProperty<Effect>The input for thisEffect.final DoublePropertyThe x coordinate of the output location onto which the lower left corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the lower left corner of the source is mapped.final DoublePropertyThe x coordinate of the output location onto which the lower right corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the lower right corner of the source is mapped.final voidSets the value of theinputproperty.final voidsetLlx(double value) Sets the value of thellxproperty.final voidsetLly(double value) Sets the value of thellyproperty.final voidsetLrx(double value) Sets the value of thelrxproperty.final voidsetLry(double value) Sets the value of thelryproperty.final voidsetUlx(double value) Sets the value of theulxproperty.final voidsetUly(double value) Sets the value of theulyproperty.final voidsetUrx(double value) Sets the value of theurxproperty.final voidsetUry(double value) Sets the value of theuryproperty.final DoublePropertyThe x coordinate of the output location onto which the upper left corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the upper left corner of the source is mapped.final DoublePropertyThe x coordinate of the output location onto which the upper right corner of the source is mapped.final DoublePropertyThe y coordinate of the output location onto which the upper right corner of the source is mapped.
- 
Property Details- 
inputThe 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:
 
- 
ulxThe x coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
- 
ulyThe y coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
- 
urxThe x coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
- 
uryThe y coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
- 
lrxThe x coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
- 
lryThe y coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
- 
llxThe x coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
- 
llyThe y coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- See Also:
 
 
- 
- 
Constructor Details- 
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 Details- 
setInputSets the value of theinputproperty.- 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
- Parameters:
- value- the value for the- inputproperty
- See Also:
 
- 
getInputGets the value of theinputproperty.- 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
- Returns:
- the value of the inputproperty
- See Also:
 
- 
inputPropertyThe 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
- Returns:
- the inputproperty
- See Also:
 
- 
setUlxpublic final void setUlx(double value) Sets the value of theulxproperty.- Property description:
- The x coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- ulxproperty
- See Also:
 
- 
getUlxpublic final double getUlx()Gets the value of theulxproperty.- Property description:
- The x coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the ulxproperty
- See Also:
 
- 
ulxPropertyThe x coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the ulxproperty
- See Also:
 
- 
setUlypublic final void setUly(double value) Sets the value of theulyproperty.- Property description:
- The y coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- ulyproperty
- See Also:
 
- 
getUlypublic final double getUly()Gets the value of theulyproperty.- Property description:
- The y coordinate of the output location onto which the upper left corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the ulyproperty
- See Also:
 
- 
ulyPropertyThe y coordinate of the output location onto which the upper left corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the ulyproperty
- See Also:
 
- 
setUrxpublic final void setUrx(double value) Sets the value of theurxproperty.- Property description:
- The x coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- urxproperty
- See Also:
 
- 
getUrxpublic final double getUrx()Gets the value of theurxproperty.- Property description:
- The x coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the urxproperty
- See Also:
 
- 
urxPropertyThe x coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the urxproperty
- See Also:
 
- 
setUrypublic final void setUry(double value) Sets the value of theuryproperty.- Property description:
- The y coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- uryproperty
- See Also:
 
- 
getUrypublic final double getUry()Gets the value of theuryproperty.- Property description:
- The y coordinate of the output location onto which the upper right corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the uryproperty
- See Also:
 
- 
uryPropertyThe y coordinate of the output location onto which the upper right corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the uryproperty
- See Also:
 
- 
setLrxpublic final void setLrx(double value) Sets the value of thelrxproperty.- Property description:
- The x coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- lrxproperty
- See Also:
 
- 
getLrxpublic final double getLrx()Gets the value of thelrxproperty.- Property description:
- The x coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the lrxproperty
- See Also:
 
- 
lrxPropertyThe x coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the lrxproperty
- See Also:
 
- 
setLrypublic final void setLry(double value) Sets the value of thelryproperty.- Property description:
- The y coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- lryproperty
- See Also:
 
- 
getLrypublic final double getLry()Gets the value of thelryproperty.- Property description:
- The y coordinate of the output location onto which the lower right corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the lryproperty
- See Also:
 
- 
lryPropertyThe y coordinate of the output location onto which the lower right corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the lryproperty
- See Also:
 
- 
setLlxpublic final void setLlx(double value) Sets the value of thellxproperty.- Property description:
- The x coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- llxproperty
- See Also:
 
- 
getLlxpublic final double getLlx()Gets the value of thellxproperty.- Property description:
- The x coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the llxproperty
- See Also:
 
- 
llxPropertyThe x coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the llxproperty
- See Also:
 
- 
setLlypublic final void setLly(double value) Sets the value of thellyproperty.- Property description:
- The y coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
- Parameters:
- value- the value for the- llyproperty
- See Also:
 
- 
getLlypublic final double getLly()Gets the value of thellyproperty.- Property description:
- The y coordinate of the output location onto which the lower left corner of the source is mapped.
- Default value:
- 0.0
- Returns:
- the value of the llyproperty
- See Also:
 
- 
llyPropertyThe y coordinate of the output location onto which the lower left corner of the source is mapped.- Default value:
- 0.0
- Returns:
- the llyproperty
- See Also:
 
 
-