rom/graphics: -Wall cleanup
[AROS.git] / rom / graphics / orregionregionnd.c
blobf7f8c14a551a8b580337293fdc8465d7a674c7a3
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(struct Region *, OrRegionRegionND,
19 /* SYNOPSIS */
20 AROS_LHA(struct Region *, R1, A0),
21 AROS_LHA(struct Region *, R2, A1),
23 /* LOCATION */
24 struct GfxBase *, GfxBase, 125, Graphics)
26 /* FUNCTION
27 OR of one region with another region.
29 INPUTS
30 region1 - pointer to a region structure
31 region2 - pointer to a region structure
33 RESULT
34 The resulting region or NULL in case there's no enough free memory
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 XorRegionRegion(), OrRegionRegion()
45 INTERNALS
47 HISTORY
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct Region *R3 = NewRegion();
55 if (R3)
59 _DoOperationBandBand
61 _OrBandBand,
62 MinX(R1),
63 MinX(R2),
64 MinY(R1),
65 MinY(R2),
66 R1->RegionRectangle,
67 R2->RegionRectangle,
68 &R3->RegionRectangle,
69 &R3->bounds,
70 GfxBase
75 _TranslateRegionRectangles(R3->RegionRectangle, -MinX(R3), -MinY(R3));
77 return R3;
80 DisposeRegion(R3);
83 return NULL;
85 AROS_LIBFUNC_EXIT