> From the st80 ages, rectangle have allways been oriented.
> You have an origin and a corner inst var, not 2 corners or vertices.
> And you have creation messages Rectangle class>>origin:corner:
> The conventions are that of latin scribes, the orientation of rectangle 
> should be (left->right , top->down)
> 
> There is an assumption that a rectangle with negative width (right->left) or 
> height (bottom->top) should be treated as empty.


> And this was globally well maintained except a few breakages introduced in 
> Squeak along the years (but I hope I corrected most of the slips since then).
> 
> Now Igor and Stephane had another view more geometric and un-oriented, and 
> wanted to change conventions/handling of empty rectangles in Pharo.
> I don't know how far they went, or even if it is feasible at all... IMO, it's 
> a recipe for maximizing breakage/gain ratio.

It is clearly not. :)
We removed bugs in the invalid rectangle areas and others.
And we fixed all the places that were created negative dimensions (like in 
framelayout) because rectangle where hijack to represent two points that were 
not 
a rectangle.
We also introduce margin which is really nice to represent 1,2, or 4 digits and 
avoid to overuse again a rectangle. 

> Note that VW has Rectangle class>>vertex:vertex:, and we probably should add 
> such message...
> 
> 
> 
> 
> 2014-03-21 15:15 GMT+01:00 Noury Bouraqadi <bouraq...@gmail.com>:
> Inverting the origin and the corner of a rectangle changes the result of 
> intersection.
> I guess it's a bug, though I imagine that changing the code of Rectangle is 
> likely to have deep/undesired consequences..
> 
> (0@0 corner: 100@100) intersects: (-50@ -50 corner: 80@80) ==> true
> (100@100 corner: 0@0) intersects: (-50@ -50 corner: 80@80) ==> false  !!!!
> 
> Noury
> 
> 
> 
> 
> 

Reply via email to