How to search for positions inside a path with Region
<p>I have some sprite objects at different positions on the screen. When I draw a shape around one or several of those objects, I want to know which object that are inside. For this I'm using the Region class and the contains() method. The drawn shape is stored as a path. For now I have only made some code to check for any the objects position, but it's not working? It seems like it's not finding any positions despite that I have a shape around them. What have I done wrong? Or is there a better way?</p>

<pre><code>// Create path
path.moveTo(touchDownX, touchDownY);
for(Point point: points) {
path.lineTo(point.x, point.y);
}   
// Draw path
canvas.drawPath(path, paint);

Region region = new Region();
region.setPath(path, region);

// Loop throw all circle objects
for (int i=0; i&lt;5;i++) {

int x = circleManager.getCirclePositionX(i);
int y = circleManager.getCirclePositionY(i);
if(region.contains(x, y))
Log.i("YES!", "");      
}
</code></pre>
