| Summary: | Precise Draw2D geometry is incompatible with the old one | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alex Boyko <aboyko> | ||||
| Component: | GEF-Legacy Draw2d | Assignee: | Alexander Nyßen <nyssen> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | ahunter.eclipse, nyssen | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7.1 (Indigo) M4 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Alex Boyko
Alex, you are right, updatePreciseWeight()and updatePreciseHeight() should be independent of x and y. And I think the same has to hold for updateWidthInt() and updateHeightInt(), which also take the x and y values into account. I introduced this, because the original updateInts() method (which is now deprecated) was implemented as: x = (int) Math.floor(preciseX + 0.000000001); y = (int) Math.floor(preciseY + 0.000000001); width = (int) Math.floor(preciseWidth + preciseX + 0.000000001) - x; height = (int) Math.floor(preciseHeight + preciseY + 0.000000001) - y; Here of course, all fields were always updated together and the "reverse" synchronization was not in place (this was introduced with 3.7). I changed that updateWidthInt(), updateHeightInt(), updatePreciseWidthDouble() and updatePreciseHeightDouble() only use low and high precision field they have to update in their calculation. I also added your test case (which I augmented with assertions for x, y, and height) to Draw2d. Committed changes to cvs HEAD (3.7). Changed verison to 3.7 from 3.6.2. Verified that we don't get infinite loops on opening diagrams. Thanks very much for the quick turn around on this :-) (In reply to comment #3) > Changed verison to 3.7 from 3.6.2. Does this mean we need the fix in 3.6.2 as well? (In reply to comment #4) > (In reply to comment #3) > > Changed verison to 3.7 from 3.6.2. > > Does this mean we need the fix in 3.6.2 as well? No, the refactoring of precision API was performed in the 3.7 stream only, so 3.6.2 is not affected. |