Hi Trey,
I can't find the rational written down why Rectangle was changed (although it WAS written down).�� If I remember right, the rational was roughly "Rectangles represent areas of the screen.�� As such, they should be 'well formed'- positive width and height only".
In any case, going back through the archives, I found this bit of advice:

"
You need to use a different API: for example:

frame := (0 @ 0 corner: 1.0 @ 1.0) asLayoutFrame topLeftOffset: 0 @ 50; bottomRightOffset: 0@50 negated.
"

Thanks,
-cbc

On Tue, Jun 20, 2017 at 3:10 PM, Trey Tomes <trey.tomes@gmail.com> wrote:
Hello!

I'm new to this list, so I apologize if this topic has already been considered.

I have been re-creating the Laser Game tutorial in Pharo 6, and have encountered something that may be an error within Pharo.

The LayoutFrame has the ability to use negative values for the bottom and right sides of the rectangle assigned to the offsets, e.g.

LayoutFrame fraction: ((0@0 corner: (1@1)) offsets: ((4@4 corner: (-4@-4)).

This is useful, as it allows the system to automatically calculate the margins inset from the bottom and right sides of the container.

In Pharo 6, this does not work.�� The setLeft:right:top:bottom: and setPoint:point: messages both use the min: and max: messages to rearrange the Rectangle so that the smallest numbers get pushed to the top and left.

In order to get things to render correctly in my system, I had to change these messages to look like this:

setLeft: left right: right top: top bottom: bottom
    self setPoint: (left@top) point: (right@bottom).

setPoint: pt1 point: pt2
    origin := pt1.
    corner := pt2.

In place of this:

setLeft: left right: right top: top bottom: bottom
    origin := (left min: right) @ (top min: bottom).
    corner := (left max: right) @ (top max: bottom).

setPoint: pt1 point: pt2
    origin := (pt1 x min: pt2 x) @ (pt1 y min: pt2 y).
    corner := (pt1 x max: pt2 x) @ (pt1 y max: pt2 y).

I haven't found any bad side-effects to changing this yet, but is there a reason the Rectangle class was changed?

Thanks,
Trey