[interfacekit] Re: about the BRect bug
- From: "Marc Flerackers" <mflerackers@xxxxxxxxxx>
- To: <interfacekit@xxxxxxxxxxxxx>
- Date: Tue, 3 Dec 2002 09:46:10 +0100
The BeBook says: Intersect() returns true if the BRect has any area?even a
corner or part of a side?in common with rect, and false if it doesn't.
So it looks like it's just the mathematical definition of intersects (taken
a rect as a collection of pixels).
My personal BRect uses this:
bool BRect::Intersects ( BRect rect ) const
{
return !( rect.right < left || rect.left > right ||
rect.bottom < top || rect.top > bottom );
}
It's much more simple than the one in cvs, and it seems to work ^_^.
Marc Flerackers (mflerackers@xxxxxxxxxx)
Software Engineer
ANDROME NV
> -----Original Message-----
> From: interfacekit-bounce@xxxxxxxxxxxxx
> [mailto:interfacekit-bounce@xxxxxxxxxxxxx]On Behalf Of
> burton666@xxxxxxxxxxx
> Sent: dinsdag 3 december 2002 9:32
> To: interfacekit@xxxxxxxxxxxxx
> Subject: [interfacekit] about the BRect bug
>
>
>
> I don't think this is a bug. If a Rect
> totally contains another, the two perimeters never intersects. So
> it could be that
> Intersects() means "the perimeter intersects...".
>
> -----------------------------------------------------
> Invia un sms gratis!
> http://freesms.supereva.it/index.php
>
> messaggio inviato con Freemail by www.superEva.it
> -----------------------------------------------------
>
>
- References:
- [interfacekit] about the BRect bug
- From: burton666
Other related posts:
- » [interfacekit] about the BRect bug
- » [interfacekit] Re: about the BRect bug
- » [interfacekit] Re: about the BRect bug
- » [interfacekit] Re: about the BRect bug
- [interfacekit] about the BRect bug
- From: burton666