2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Graphics function ClearRectRegion()
8 #include "graphics_intern.h"
9 #include <graphics/regions.h>
10 #include <proto/graphics.h>
11 #include "intregions.h"
13 /*****************************************************************************
16 #include <clib/graphics_protos.h>
18 AROS_LH2(BOOL
, ClearRectRegion
,
21 AROS_LHA(struct Region
*, Reg
, A0
),
22 AROS_LHA(struct Rectangle
*, Rect
, A1
),
25 struct GfxBase
*, GfxBase
, 87, Graphics
)
28 Clear the given Rectangle from the given Region
31 region - pointer to a Region structure
32 rectangle - pointer to a Rectangle structure
35 FALSE if not enough memory was available, else TRUE
44 AndRectRegion(), OrRectRegion(), XorRectRegion()
49 27-11-96 digulla automatically created from
50 graphics_lib.fd and clib/graphics_protos.h
51 20-01-96 mreckt initial version
53 *****************************************************************************/
58 struct RegionRectangle rr
;
60 /* If the rectangle and the region don't overlap just return */
61 if (IS_RECT_EVIL(Rect
) || !overlap(*Rect
, Reg
->bounds
))
64 /* if the rectangle completely covers the region just clear the region and return */
67 Rect
->MinX
<= MinX(Reg
) &&
68 Rect
->MinY
<= MinY(Reg
) &&
69 Rect
->MaxX
>= MaxX(Reg
) &&
70 Rect
->MaxY
>= MaxY(Reg
)
104 _TranslateRegionRectangles(Res
.RegionRectangle
, -MinX(&Res
), -MinY(&Res
));
112 } /* ClearRectRegion */