On 13 February 2013 23:47, Nicolas Cellier
<[email protected]> wrote:
> I tried to put a halt in Rectangle>>setOrigin: topLeft corner: bottomRight
> in latest Pharo (20543) if width < 0 or height < 0 and of course the
> image hung...
> which means that degenerated Rectangles are pretty much in use
>
they are, because you can construct rectanges from two arbitrary points:

rect := (100@100) corner: (0@0)..

but internally, Rectangle should check that and do correct
rearrangement and then answer correct values on:

left => 0
top => 0
right => 100
bottom => 100

width => 100
height => 100



that was the final goal of all refactorings (make sure that internally
, Rectangle stores coordinates in right order, regardless of what you
supplied as origin & corner).

But that was requiring to review all users of rects where it assumed
that once they put origin>corner
it will be like that.. (like offsets in frames etc)..

so, this last change was not done.. because it is scary one ;)
we need to test if it will work.


> I think I will juts raise a Notification, and catch it with a
> MessageTally hack to track the senders
> (as documented at
> http://bugs.squeak.org/bug_view_advanced_page.php?bug_id=6755 )
>
> Nicolas
>
> 2013/2/13 Igor Stasenko <[email protected]>:
>> yes.. and i'd like to add that in some places i replaced senders of
>>
>> rect1 intersect: rect2
>>
>> with:
>>
>> rect1 intersect: rect2 ifNone: [ self error: 'should not happen'].
>>
>> as it appears, it happens in some places... because of the above 
>> inconsistency.
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>



-- 
Best regards,
Igor Stasenko.

Reply via email to