Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / rom / graphics / areregionsequal.c
blobb70a7cc9279b5d3acba3672cff4ffa620e0e9b93
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function AndRegionRegion()
6 Lang: english
7 */
8 #include "graphics_intern.h"
9 #include <graphics/regions.h>
10 #include "intregions.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH2(BOOL, AreRegionsEqual,
19 /* SYNOPSIS */
20 AROS_LHA(struct Region *, R1, A0),
21 AROS_LHA(struct Region *, R2, A1),
23 /* LOCATION */
24 struct GfxBase *, GfxBase, 189, Graphics)
26 /* FUNCTION
27 Compares two regions.
29 INPUTS
30 region1 - pointer to a region structure
31 region2 - pointer to a region structure
33 RESULT
34 TRUE if the regions are equal, FALSE otherwise.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 XorRegionRegion(), OrRegionRegion()
45 INTERNALS
47 HISTORY
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct RegionRectangle *rr1, *rr2;
55 if (!_AreRectsEqual(Bounds(R1), Bounds(R2)))
56 return FALSE;
58 for
60 rr1 = R1->RegionRectangle, rr2 = R2->RegionRectangle;
61 rr1 && rr2 && _AreRectsEqual(Bounds(rr1), Bounds(rr2));
62 rr1 = rr1->Next, rr2 = rr2->Next
65 return rr1 == rr2;
67 AROS_LIBFUNC_EXIT