aboutsummaryrefslogtreecommitdiffstats
path: root/src/gmisc/gmisc_hittest.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-06-23 13:02:07 +1000
committerinmarket <andrewh@inmarket.com.au>2018-06-23 13:02:07 +1000
commit41271d632b74f5cf47c30d3b699eb6b2786f2136 (patch)
tree78bcb729c6d6177ca598f28908fefd186c50e9b6 /src/gmisc/gmisc_hittest.c
parent3b97fb798e96514057bcf17263c1e5dbdcd7da26 (diff)
downloaduGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.gz
uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.bz2
uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.zip
Added new type definitions - moving towards V3.0
Diffstat (limited to 'src/gmisc/gmisc_hittest.c')
-rw-r--r--src/gmisc/gmisc_hittest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gmisc/gmisc_hittest.c b/src/gmisc/gmisc_hittest.c
index f84a66cf..6e977cb2 100644
--- a/src/gmisc/gmisc_hittest.c
+++ b/src/gmisc/gmisc_hittest.c
@@ -64,7 +64,7 @@ static char _pointCrossingSegment(const point *a, const point *b, const point *c
return -1;
}
-bool_t gmiscHittestPoly(const point *pntarray, unsigned cnt, const point *p) {
+gBool gmiscHittestPoly(const point *pntarray, unsigned cnt, const point *p) {
unsigned i = 0;
uint8_t nbrIntersection = 0;
int8_t crossResult;
@@ -80,7 +80,7 @@ bool_t gmiscHittestPoly(const point *pntarray, unsigned cnt, const point *p) {
/* Point on the edge of the polygon */
if (crossResult == 0) {
- return TRUE;
+ return gTrue;
}
/* Point crossing the polygon */
else if(crossResult == 1) {
@@ -98,18 +98,18 @@ bool_t gmiscHittestPoly(const point *pntarray, unsigned cnt, const point *p) {
}
if (crossResult == 0) {
- return TRUE;
+ return gTrue;
} else if(crossResult == 1) {
nbrIntersection++;
}
/* If we cross an even pair of segments, we are outside */
if (nbrIntersection % 2 == 0) {
- return FALSE;
+ return gFalse;
}
/* Else we are inside the polygon */
- return TRUE;
+ return gTrue;
}
#endif // GMISC_NEED_HITTEST_POLY