Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 483710

Summary: Augment GeometryProvider infrastructure
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.wienand
Version: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M4   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2015-12-05 04:07:45 EST
We should ensure that inferring a geometry from a visual is based on the geometric bounds for javafx shapes. The VisualOutlineProvider should use the layout bounds instead (to consider stroke as well). Maybe we should rename it to GeometricBoundsOutlineProvider to indicate its actually not the visual outline.
Comment 1 Alexander Nyßen CLA 2015-12-05 09:12:42 EST
Indeed, we could think of offering 4 different default providers:

- GeometricBoundsProvider -> uses geometric bounds
- VisualBoundsProvider -> uses layout bounds
- GeometricOutlineProvider -> outline computed from 'pure' geometry
- VisualOutlineProvider -> visual outline (includes stroke; could be computed by scaling geometric outline with the scale factor that corresponds to difference of geometric and layout bounds)
Comment 2 Alexander Nyßen CLA 2015-12-10 03:25:08 EST
As visual bounds are used to refer to bounds including effect and clip, it may be better to use 'geometric bounds'  and 'shape bounds' to refer to the concepts we are dealing with here:

- GeometricBoundsProvider (rectilinear geometric bounds)
- GeometricOutlineProvider (tight geometric bounds)
- ShapeBoundsProvider (rectilinear geometric bounds + stroke == layout bounds)
- ShapeOutlineProvider (tight geometric bounds + stroke)
Comment 3 Matthias Wienand CLA 2015-12-10 11:21:33 EST
I created/renamed the providers as suggested and adjusted the implementation and the bindings accordingly. The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.11.0M4.