You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a recent change, the rounding of rectangles width/height was
adapted to be based on the precise (float) coordinates of the top left
and bottom right corner of the rectangle instead of rounding top left
location and width/height individually in the rectangle. The reason was
that otherwise two rectangles placed next to each other and scaled from
pixel to point or vice versa could overlap or have a gap between them
when the resulting values were rounded. So the change was beneficial
(i.e., improved precision) when scaling values from pixel to point or
vice versa if they are all defined in the same coordinate system (with
the same origin), as then equal coordinates are rounded equally.
However, the coordinates used in SWT are usually in different coordinate
systems with the origin often being the position of the parent control.
So one consequence of the change was that a parent with a child, both of
the same size, may not fit into each other anymore if the parent has an
offset (with respect to its parent) that is taken into account when
rounding the Rectangle values.
For that reason, this change reverts the behavioral change of Rectangle
and the point/pixel conversion logic to the previous state.
Fixes#2746
0 commit comments