I think you are right and the docs should be updated to indicate this. If you would like to file a JIRA and a patch that would be awesome.
Thanks Richard On Jul 8, 2013, at 9:20 AM, Scott Palmer <swpal...@gmail.com> wrote: > The javadocs discussing Bounding Rectangles for Node state: > > "The images show a filled and stroked rectangle and their bounds. The first > rectangle [x:10.0 y:10.0 width:100.0 height:100.0 strokeWidth:0] has the > following bounds bounds: [x:10.0 y:10.0 width:100.0 height:100.0]. The > second rectangle [x:10.0 y:10.0 width:100.0 height:100.0 strokeWidth:5] has > the following bounds: [x:5.0 y:5.0 width:110.0 height:110.0]. Since neither > of the rectangles has any transformation applied, boundsInParent and > boundsInLocal are the same." > > But I think that is wrong, or at least incomplete and potentially > misleading. Rectangle is a Shape so the StrokeType matters here and the > default StrokeType is CENTERED. (Though when I drop one on the Scene in > Scene Builder, it defaults to INSIDE, something that I think should be > considered a SceneBuilder bug.) > > So by default the bounds would be only extending 2.5 on each side for a > total width and height of 105 and x and y coordinates of 7.5. > > Scott