Commit c51d3c3
Make IFigure#translate...() results backward compatible for Rectangle
The wrapping of Rectangles into their precision representations when
calling IFigure#translate...() methods leads to results that are
incompatible with pre-existing behavior when only a single scaled layer
is involved. The reason is the different rounding applied in a basic
Rectangle compared to a PrecisionRectangle. Recent attempts to adapt the
PrecisionRectangle behavior failed because they broke backward
compatibility. But without streamlining the rounding of Rectangle and
PrecisionRectangle, the results of IFigure#translate...() become
incompatible.
For that reason, this change adapts the unwrapping of PrecisionRectangle
to Rectangle in IFigure#translate...() to use the same rounding as
applied in Rectangle to ensure backward compatibility of the method's
behavior.1 parent 04a3286 commit c51d3c3
File tree
2 files changed
+36
-8
lines changed- org.eclipse.draw2d.tests/src/org/eclipse/draw2d/test
- org.eclipse.draw2d/src/org/eclipse/draw2d
2 files changed
+36
-8
lines changedLines changed: 33 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | | - | |
70 | 72 | | |
71 | | - | |
72 | | - | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | | - | |
83 | 87 | | |
84 | | - | |
85 | | - | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
111 | 137 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2128 | 2128 | | |
2129 | 2129 | | |
2130 | 2130 | | |
2131 | | - | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
2132 | 2134 | | |
2133 | 2135 | | |
2134 | 2136 | | |
| |||
0 commit comments