2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: (AROS only) Graphics function AndRectRect()
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
10 #include <graphics/regions.h>
11 #include <clib/macros.h>
12 #include "intregions.h"
14 /*****************************************************************************
17 #include <clib/graphics_protos.h>
19 AROS_LH3(BOOL
, AndRectRect
,
22 AROS_LHA(struct Rectangle
*, rect1
, A0
),
23 AROS_LHA(struct Rectangle
*, rect2
, A1
),
24 AROS_LHA(struct Rectangle
*, intersect
, A2
),
27 struct GfxBase
*, GfxBase
, 193, Graphics
)
30 Calculate the intersection rectangle between the
31 given Rectangle rect1 and the given Rectangle rect2
32 leaving the result in intersect (if intersect != NULL).
35 rect1 - pointer to 1st Rectangle
36 rect2 - pointer to 2nd Rectangle
37 intersect -> pointer to rectangle which will hold result. May be NULL.
40 TRUE if rect1 and rect2 do intersect. In this case intersect (unless NULL)
41 will contain the intersection rectangle.
43 FALSE if rect1 and rect2 do not overlap. "intersect" will
44 then be left unchanged.
47 This function does not exist in AmigaOS.
54 AndRectRegion() AndRegionRegion()
59 15-12-2000 stegerg implemented
61 *****************************************************************************/
65 ASSERT_VALID_PTR(rect1
);
66 ASSERT_VALID_PTR(rect2
);
67 ASSERT_VALID_PTR_OR_NULL(intersect
);
70 return _AndRectRect(rect1
, rect2
, intersect
);
72 return overlap(*rect1
, *rect2
);