changeset 1072:cf82361fe5b9 openvg

Disable _fill_and_check() for collision detection
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 01 Dec 2010 19:59:58 +0800
parents 1a75a4778515
children d09f603438d8
files src/event.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/event.c	Wed Dec 01 14:33:57 2010 +0800
+++ b/src/event.c	Wed Dec 01 19:59:58 2010 +0800
@@ -697,6 +697,11 @@
 
 static
 void _draw_to_mask(shape_t *shape, mbe_t *cr) {
+    /* TODO: Find a new algorithm to check if a point is in the area
+     * covered by a shape.  This function is expected to work with
+     * _fill_and_check() to detect a collision.
+     */
+#if 0
     if(sh_get_flags(shape, GEF_OV_DRAW))
 	return;
 
@@ -704,10 +709,12 @@
     mbe_clip(cr);
 
     sh_set_flags(shape, GEF_OV_DRAW);
+#endif
 }
 
 static
 int _fill_and_check(shape_t *shape, mbe_t *cr) {
+#if 0
     int h, stride;
     mbe_surface_t *surface;
     unsigned char *data;
@@ -729,6 +736,9 @@
     }
 
     return FALSE;
+#else
+    return TRUE;
+#endif
 }
 
 /*! \brief Is a mb_obj_t overlaid with another mb_obj_t and