MGL_sectRectFastCoord

Compute the intersection between two rectangles.

Declaration

ibool MGL_sectRectFastCoord(
    int left1,
    int top1,
    int right1,
    int bottom1,
    int left2,
    int top2,
    int right2,
    int bottom2,
    rect_t *d)

Prototype In

mgraph.h

Parameters

left1

Left coordinate of first rectangle to intersect

top1

Top coordinate of first rectangle to intersect

right1

Right coordinate of first rectangle to intersect

bottom1

Bottom coordinate of first rectangle to intersect

left2

Left coordinate of second rectangle to intersect

top2

Top coordinate of second rectangle to intersect

right2

Right coordinate of second rectangle to intersect

bottom2

Bottom coordinate of second rectangle to intersect

d

Place to store the resulting intersection

 

Return Value

True if the rectangles intersect, false if not.

Description

Computes the intersection of two rectangles, and returns the result in a third. If the rectangles actually intersect (the intersection is not an empty rectangle) then this function returns true, otherwise it will return false.

See Also

MGL_sectRectFastCoord, MGL_sectRect, MGL_unionRect

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com