2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Graphics function XorRegionRegion()
8 #include "graphics_intern.h"
9 #include <graphics/regions.h>
10 #include "intregions.h"
12 /*****************************************************************************
15 #include <proto/graphics.h>
17 AROS_LH2(struct Region
*, XorRegionRegionND
,
20 AROS_LHA(struct Region
*, R1
, A0
),
21 AROS_LHA(struct Region
*, R2
, A1
),
24 struct GfxBase
*, GfxBase
, 151, Graphics
)
27 Exclusive-OR of one region with another region.
30 region1 - pointer to a region structure
31 region2 - pointer to a region structure
34 The resulting region or NULL in case there's no enough free memory
37 This function is not present in AmigaOS
44 AndRegionRegion(), OrRegionRegion()
49 27-11-96 digulla automatically created from
50 graphics_lib.fd and clib/graphics_protos.h
51 19-01-97 mreckt intital version
53 22-09-2001 falemagn changed implementation
55 *****************************************************************************/
63 !R1
->RegionRectangle
||
64 !R2
->RegionRectangle
||
65 !overlap(R1
->bounds
, R2
->bounds
)
68 return OrRegionRegionND(R1
, R2
);
75 struct RegionRectangle
*Diff1
= NULL
;
76 struct RegionRectangle
*Diff2
= NULL
;
114 &R3
->RegionRectangle
,
119 _DisposeRegionRectangleList(Diff1
, GfxBase
);
120 _DisposeRegionRectangleList(Diff2
, GfxBase
);
124 _TranslateRegionRectangles(R3
->RegionRectangle
, -MinX(R3
), -MinY(R3
));