Supported Browsers Home   
GA_sectRect Previous   
GA_sectRectFast Next   
External Functions Up   

GA_sectRectCoord

Compute the intersection between two rectangles.

Declaration

ibool GA_sectRectCoord(
    int left1,
    int top1,
    int right1,
    int bottom1,
    int left2,
    int top2,
    int right2,
    int bottom2,
    GA_rect *d)

Prototype In

snap/graphics.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

GA_sectRectFastCoord, GA_sectRect, GA_unionRect

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