compiler: Support autoopening of libraries in AROS_SHxx() style programs
[AROS.git] / rom / graphics / areregionsequal.c
blob862c120a0791bb700ae71412b23d855e2183f5e2
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function AndRegionRegion()
6 Lang: english
7 */
9 #include "graphics_intern.h"
10 #include <graphics/regions.h>
11 #include "intregions.h"
13 /*****************************************************************************
15 NAME */
16 #include <proto/graphics.h>
18 AROS_LH2(BOOL, AreRegionsEqual,
20 /* SYNOPSIS */
21 AROS_LHA(struct Region *, R1, A0),
22 AROS_LHA(struct Region *, R2, A1),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 183, Graphics)
27 /* FUNCTION
28 Compares two regions.
30 INPUTS
31 region1 - pointer to a region structure
32 region2 - pointer to a region structure
34 RESULT
35 TRUE if the regions are equal, FALSE otherwise.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 XorRegionRegion(), OrRegionRegion()
46 INTERNALS
48 HISTORY
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct RegionRectangle *rr1, *rr2;
56 if (!_AreRectsEqual(Bounds(R1), Bounds(R2)))
57 return FALSE;
59 for
61 rr1 = R1->RegionRectangle, rr2 = R2->RegionRectangle;
62 rr1 && rr2 && _AreRectsEqual(Bounds(rr1), Bounds(rr2));
63 rr1 = rr1->Next, rr2 = rr2->Next
66 return rr1 == rr2;
68 AROS_LIBFUNC_EXIT