Working with Bounds Demo

There is a very nice public demo by Kishori Sharan that shows how bounds work: http://www.java2s.com/Tutorials/Java/JavaFX_How_to/Node/Know_how_three_bounds_layoutBounds_boundsInLocal_and_boundsInParent_are_computed_for_a_node.htm.

It uses a deprecated API, so I've fixed it and added it to our GitHub as chapter2/other/BoundsDemo.java.

In the following screenshot from this demo, there is a Rectangle with rotation and translate transformations, and a shadow effect: 

The smallest rectangle represents layoutBounds—it's the position of original Rectangle before any other changes.

The bigger rectangle around it is boundsInLocal ...

Get Mastering JavaFX 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.