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

Bug 491403

Summary: Enchancement for Point (getDifference)
Product: [Tools] GEF Reporter: Colin Sharples <ctg>
Component: GEF GeometryAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 0.2.0   
Target Milestone: 4.0.0 (Neon) M7   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Attachments:
Description Flags
Patch to add getDifference method to Point
nyssen: iplog+
Test case for Point.getDifference() nyssen: iplog+

Description Colin Sharples CLA 2016-04-10 20:37:35 EDT
Created attachment 260833 [details]
Patch to add getDifference method to Point

I would like to propose a minor enhancement to org.eclipse.gef4.geometry.planar.Point.

One new method: Point getDifference(Point), which returns the translation required to move this point to the other point. This makes it convenient to calculate a transformation from two input points.
Comment 1 Colin Sharples CLA 2016-04-10 20:37:59 EDT
This contribution complies to the Eclipse Foundation Certificate of Origin
Comment 2 Colin Sharples CLA 2016-04-11 17:34:25 EDT
Created attachment 260873 [details]
Test case for Point.getDifference()
Comment 3 Alexander Nyßen CLA 2016-04-12 10:48:32 EDT
Thanks Colin. Could you please confirm that the second patch complies to the Eclipse Foundation Certificate of Origin as well?
Comment 4 Colin Sharples CLA 2016-04-12 15:38:47 EDT
Yes, the testcase patch complies to the Eclipse Foundation Certificate of Origin.

Sorry, didn't realise that I had to do that for each patch. I will add both patches at the same time in future :-)
Comment 5 Alexander Nyßen CLA 2016-04-13 01:16:59 EDT
I released your patches to origin/master. Thanks again for the contribution.

Resolving this as fixed for 4.0.0. M7.