2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Graphics function AndRectRegion()
8 #include "graphics_intern.h"
9 #include <graphics/regions.h>
10 #include <proto/exec.h>
11 #include <clib/macros.h>
12 #include "intregions.h"
14 /*****************************************************************************
17 #include <proto/graphics.h>
19 AROS_LH2(struct Region
*, ClearRectRegionND
,
22 AROS_LHA(struct Region
*, Reg
, A0
),
23 AROS_LHA(struct Rectangle
*, Rect
, A1
),
26 struct GfxBase
*, GfxBase
, 124, Graphics
)
29 Clear the given Rectangle from the given Region
32 region - pointer to Region structure
33 rectangle - pointer to Rectangle structure
36 The resulting region or NULL in case there's no enough free memory
43 AndRegionRegion() OrRectRegion() XorRectRegion() ClearRectRegion()
49 27-11-96 digulla automatically created from
50 graphics_lib.fd and clib/graphics_protos.h
51 16-01-97 mreckt initial version
53 *****************************************************************************/
61 !Reg
->RegionRectangle
||
62 !overlap(*Rect
, Reg
->bounds
)
65 return CopyRegion(Reg
);
74 Rect
->MinX
> MinX(Reg
) ||
75 Rect
->MinY
> MinY(Reg
) ||
76 Rect
->MaxX
< MaxX(Reg
) ||
77 Rect
->MaxY
< MaxY(Reg
)
81 struct RegionRectangle rr
;
98 &Res
->RegionRectangle
,
104 _TranslateRegionRectangles(Res
->RegionRectangle
, -MinX(Res
), -MinY(Res
));
116 } /* AndRectRegion */