2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Graphics function AndRegionRegion()
8 #include "graphics_intern.h"
9 #include <graphics/regions.h>
10 #include "intregions.h"
12 /*****************************************************************************
15 #include <proto/graphics.h>
17 AROS_LH3(BOOL
, IsPointInRegion
,
20 AROS_LHA(struct Region
*, Reg
, A0
),
21 AROS_LHA(WORD
, x
, D0
),
22 AROS_LHA(WORD
, y
, D1
),
25 struct GfxBase
*, GfxBase
, 190, Graphics
)
28 Checks if the point (x, y) is contained in the region Reg
31 region1 - pointer to a region structure
32 x - The point's 'x' coordinate
33 y - The point's 'y' coordinate
36 TRUE if the point is contained, FALSE otherwise
39 This function isn't available in AmigaOS.
46 XorRegionRegion(), OrRegionRegion()
52 *****************************************************************************/
56 struct RegionRectangle
*rr
;
58 if (!_IsPointInRect(Bounds(Reg
), x
, y
))
66 rr
= Reg
->RegionRectangle
;
71 if (y
> MaxY(rr
)) continue;
72 if (y
< MinY(rr
)) return FALSE
;
73 if (x
< MinX(rr
)) continue;
74 if (x
> MaxX(rr
)) continue;