Re: Intersecting Polygons

From: Douglas Marquardt (no_spam_at_dummy.com)
Date: 09/14/04


Date: Tue, 14 Sep 2004 10:41:35 -0600

Hi Matt:

>From the VB6 Doc
Public Declare Function IntersectRect Lib "user32" Alias "IntersectRect"
(lpDestRect As RECT, lpSrc1Rect As RECT, lpSrc2Rect As RECT) As Long

The IntersectRect function calculates the intersection of two source rectangles and
places the coordinates of the intersection rectangle into the destination rectangle.
If the source rectangles do not intersect, an empty rectangle (in which all coordinates are set to zero) is placed into the
destination rectangle.

Doug.

"YYZ" <notapplicable> wrote in message news:%23zsdejnmEHA.3428@TK2MSFTNGP11.phx.gbl...
> Off topic a bit, I guess...
>
> Does anyone know a mathematical formula for figuring out of 2 rectangles
> intersect?
>
> Matt
>
>



Relevant Pages

  • Re: TRect overlap
    ... > What happens is one Rect is inside the other? ... Will IntersectRect still ... Another way to do it is just check if any points of either rectangle are ... Prev by Date: ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: IntersectRect
    ... point then use the IntersectRect API call and check for a non-0 return. ... If you want to know whether one rectangle is completely within another ...
    (microsoft.public.vb.winapi.graphics)
  • Re: IntersectRect
    ... then use the IntersectRect API call and check for a non-0 return. ... want to know whether one rectangle is completely within another then use the ...
    (microsoft.public.vb.winapi.graphics)
  • Re: TRect overlap
    ... What happens is one Rect is inside the other? ... Andy ... > IntersectRect et al usually do this for you. ... Prev by Date: ...
    (borland.public.delphi.thirdpartytools.general)