use the override options if specified
[AROS.git] / rom / graphics / orregionregionnd.c
blobbb0c0038bfcafed7155e410b2b05ef13887e14b8
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(struct Region *, OrRegionRegionND,
20 /* SYNOPSIS */
21 AROS_LHA(struct Region *, R1, A0),
22 AROS_LHA(struct Region *, R2, A1),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 189, Graphics)
27 /* FUNCTION
28 OR of one region with another region.
30 INPUTS
31 region1 - pointer to a region structure
32 region2 - pointer to a region structure
34 RESULT
35 The resulting region or NULL in case there's no enough free memory
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 XorRegionRegion(), OrRegionRegion()
46 INTERNALS
48 HISTORY
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct Region *R3 = NewRegion();
56 if (R3)
60 _DoOperationBandBand
62 _OrBandBand,
63 MinX(R1),
64 MinX(R2),
65 MinY(R1),
66 MinY(R2),
67 R1->RegionRectangle,
68 R2->RegionRectangle,
69 &R3->RegionRectangle,
70 &R3->bounds,
71 GfxBase
76 _TranslateRegionRectangles(R3->RegionRectangle, -MinX(R3), -MinY(R3));
78 return R3;
81 DisposeRegion(R3);
84 return NULL;
86 AROS_LIBFUNC_EXIT