2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
9 #include "graphics_intern.h"
10 #include <graphics/regions.h>
11 #include "intregions.h"
13 /*****************************************************************************
16 #include <proto/graphics.h>
18 AROS_LH3(BOOL
, IsPointInRegion
,
21 AROS_LHA(struct Region
*, Reg
, A0
),
22 AROS_LHA(WORD
, x
, D0
),
23 AROS_LHA(WORD
, y
, D1
),
26 struct GfxBase
*, GfxBase
, 184, Graphics
)
29 Checks if the point (x, y) is contained in the region Reg
32 region1 - pointer to a region structure
33 x - The point's 'x' coordinate
34 y - The point's 'y' coordinate
37 TRUE if the point is contained, FALSE otherwise
40 This function isn't available in AmigaOS.
47 XorRegionRegion(), OrRegionRegion()
53 *****************************************************************************/
57 struct RegionRectangle
*rr
;
59 if (!_IsPointInRect(Bounds(Reg
), x
, y
))
67 rr
= Reg
->RegionRectangle
;
72 if (y
> MaxY(rr
)) continue;
73 if (y
< MinY(rr
)) return FALSE
;
74 if (x
< MinX(rr
)) continue;
75 if (x
> MaxX(rr
)) continue;