2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
9 #include <graphics/regions.h>
11 #include "graphics_intern.h"
12 #include "intregions.h"
14 /*****************************************************************************
17 #include <proto/graphics.h>
19 AROS_LH2(struct Region
*, XorRectRegionND
,
22 AROS_LHA(struct Region
*, Reg
, A0
),
23 AROS_LHA(struct Rectangle
*, Rect
, A1
),
26 struct GfxBase
*, GfxBase
, 190, Graphics
)
29 Exclusive-OR the given rectangle to the given
33 region - pointer to a region structure
34 rectangle - pointer to a rectangle structure
37 The resulting region or NULL in case there's no enough free memory
40 All relevant data is copied, you may throw away the
41 given rectangle after calling this function
48 AndRectRegion(), OrRectRegion(), ClearRectRegion()
53 27-11-96 digulla automatically created from
54 graphics_lib.fd and clib/graphics_protos.h
55 19-01-97 mreckt intital version
57 *****************************************************************************/
62 struct RegionRectangle rr
;
64 if (IS_RECT_EVIL(Rect
))
66 /* Empty rectangle. Just make a plain copy of Reg. */
67 struct Region
*ret
= NewRegion();
69 if (_CopyRegionRectangles(Reg
, ret
, GfxBase
))
79 R
.RegionRectangle
= &rr
;
82 MinX(&rr
) = MinY(&rr
) = 0;
83 MaxX(&rr
) = Rect
->MaxX
- Rect
->MinX
;
84 MaxY(&rr
) = Rect
->MaxY
- Rect
->MinY
;
86 return XorRegionRegionND(&R
, Reg
);