some fixes to accented characters
[tangerine.git] / rom / graphics / clearregionregion.c
blob3279734a727e54aa00cfecca1955f74378081a4a
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: (AROS only) Graphics function ClearRegionRegion()
6 Lang: english
7 */
8 #include "graphics_intern.h"
9 #include <proto/graphics.h>
10 #include <graphics/regions.h>
11 #include "intregions.h"
13 /*****************************************************************************
15 NAME */
16 #include <clib/graphics_protos.h>
18 AROS_LH2(BOOL, ClearRegionRegion,
20 /* SYNOPSIS */
21 AROS_LHA(struct Region *, R1, A0),
22 AROS_LHA(struct Region *, R2, A1),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 187, Graphics)
27 /* FUNCTION
28 Clear the given Region region1 from the given Region region2
29 leaving the result in region2.
31 INPUTS
32 region1 - pointer to a Region structure
33 region2 - pointer to a Rectangle structure
35 RESULT
36 FALSE if not enough memory was available, else TRUE
38 NOTES
39 This function does not exist in AmigaOS.
41 EXAMPLE
43 BUGS
45 SEE ALSO
46 ClearRectRegion(), AndRectRegion(), OrRectRegion(), XorRectRegion()
48 INTERNALS
50 HISTORY
51 13-12-2000 stegerg implemented
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 struct Region R3;
59 /* If the regions don't overlap just return */
60 if (!overlap(R1->bounds, R2->bounds))
61 return TRUE;
63 InitRegion(&R3);
67 _DoOperationBandBand
69 _ClearBandBand,
70 MinX(R1),
71 MinX(R2),
72 MinY(R1),
73 MinY(R2),
74 R1->RegionRectangle,
75 R2->RegionRectangle,
76 &R3.RegionRectangle,
77 &R3.bounds,
78 GfxBase
82 ClearRegion(R2);
84 *R2 = R3;
86 _TranslateRegionRectangles(R3.RegionRectangle, -MinX(&R3), -MinY(&R3));
88 return TRUE;
91 return FALSE;
93 AROS_LIBFUNC_EXIT
95 } /* ClearRegionRegion */