[Arakhnę-Dev] [430] * Add intersection function in the pointer event classes.

[ Thread Index | Date Index | More arakhne.org/dev Archives ]


Revision: 430
Author:   galland
Date:     2013-04-27 14:59:06 +0200 (Sat, 27 Apr 2013)
Log Message:
-----------
* Add intersection function in the pointer event classes.

Modified Paths:
--------------
    trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/actionmode/ActionPointerEvent.java

Modified: trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/actionmode/ActionPointerEvent.java
===================================================================
--- trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/actionmode/ActionPointerEvent.java	2013-04-27 12:58:20 UTC (rev 429)
+++ trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/actionmode/ActionPointerEvent.java	2013-04-27 12:59:06 UTC (rev 430)
@@ -209,4 +209,14 @@
 		return this.originalEvent.isToolAreaSupported();
 	}
 
+	@Override
+	public boolean intersects(Shape2f s) {
+		for(int i=0; i<getPointerCount(); ++i) {
+			if (s.intersects(getToolArea(i).getPathIterator())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/