These effects distort the shape of the node, usually to imitate physical effects, for example, perspective or water waves.
These effects require quite a few parameters to set up and a bit of math is involved.
These effects distort the shape of the node, usually to imitate physical effects, for example, perspective or water waves.
These effects require quite a few parameters to set up and a bit of math is involved.
The PerspectiveTransform effect is another effect which tries to simulate 3D. It changes the node's dimensions so it appears to be viewed not from the top to the bottom but at an angle.
The API is slightly awkward—you need to set all four corners of the new image by setting eight coordinates by different method calls:
// chapter8/geometry/PerspectiveDemo.java
PerspectiveTransform pt = new PerspectiveTransform();
pt.setUlx(20); // upper-left
pt.setUly(20...