Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006494 [Squeak] Graphics minor always 05-19-07 20:29 05-19-07 21:34
Reporter wiz View Status public  
Assigned To andreas
Priority normal Resolution open  
Status assigned   Product Version
Summary 0006494: Rectangle>>intersect: answers an improper Rectangle when receiver and argument don't overlap.
Description for this one in a workspace evaluate:

rect1 :=
10 asPoint extent: 10 asPoint.

rect2 :=
30 asPoint extent: 10 asPoint.

rect1 intersect: rect2 .

"answers: 30@30 corner: 20@20"
Additional Information
This is troublesome because it means getting a proper answer requires knowing if the two rectangles intersect before calling the method.

This to me is counter intuitive.
I would call the method and expect some form of zero area rectangle to be returned when no intersection occurs.

There are 74 senders of #intersect: in a fresh 3dot9 (7067).

A quick glance shows that most of these call the method without calling #intersects: first to insure the result will be valid.

So I bet this causes bugs galore.

Yours in curiosity and service, --Jerome Peace
Attached Files

- Relationships

- Notes
(0010731 - 100 - 100 - 100 - 100 - 100 - 100)
andreas
05-19-07 20:38

Although this sounds odd, this *is* a zero area rectangle. Ask for its area and it will answer zero.
 
(0010732 - 85 - 109 - 109 - 109 - 109 - 109)
wiz
05-19-07 21:34

Ha. You're right it is zero area.

I still bet it is causing bugs.

Cheers, -Jer
 

- Issue History
Date Modified Username Field Change
05-19-07 20:29 wiz New Issue
05-19-07 20:29 wiz Status new => assigned
05-19-07 20:29 wiz Assigned To  => andreas
05-19-07 20:38 andreas Note Added: 0010731
05-19-07 21:34 wiz Note Added: 0010732


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
38 total queries executed.
31 unique queries executed.
Powered by Mantis Bugtracker