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

Bug 495278

Summary: Fix Path#getBounds() for paths with cubic curve segments.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF GeometryAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 0.2.0   
Target Milestone: 4.0.0 (Neon) RC4   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2016-06-02 07:52:27 EDT
The Path#getBounds() method should return rectangular bounds that tightly enclose the path. This seems to be working well for many paths, however, when a path contains cubic bezier curve segments, the returned bounds are too big and not tightly enclosing the path.
Comment 1 Matthias Wienand CLA 2016-06-02 07:55:19 EDT
I added test cases for the Path#getBounds() method. The tests compare manually computed bounds with the bounds returned by Path#getBounds(). The tests are failing for paths with cubic segments.
Comment 2 Matthias Wienand CLA 2016-06-02 09:19:27 EDT
The bounds computation was based on AWT. I ensured that the bounds are now computed based on the individual path segments, without delegating to AWT. The computed bounds are tightly enclosing the path. The code is published on the master branch, therefore, I resolve this ticket as fixed for 4.0.0 RC4.