If you use an rtree index of the lake MBR you can perform the hit test on the 
original polygons quite fast.

Craig



On Jul 28, 2012, at 10:33 AM, Mohammed Rashad <[email protected]> 
wrote:

> All,
> 
> subject says it all. I have draw some complex shapes using WPainterPath in a 
> WPaintedWidget
> 
> for(int i=0; i< n; i++)
>    painter.drawPath(path[i])
> 
> path is array of WPainterPath
> 
> WPainterPath path[size];
> 
> using mouse how can I select a shape.?
> 
> How to get the path instance from clicking on the shape using Wt?
> 
> Is that possible?
> 
> i can connect mouseWentUp signal to some function called mouseUp
> 
> and that also have a WMouseEvent parameter
> 
> using that i can get the x and y like 
> 
> event.widget().x
> event.widget().y
> 
> Since the shapes are complex eg: waterbodies/lakes
> 
> Its not a good practice to search through each shape using some 
> PointInPolygon algorithm
> 
> and all shapes are not same in appearance and number of shapes will be in the 
> order of 100 or 1000
> 
> Any hep is very much appreciated.
> 
> -- 
> Regards,
>    Rashad
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to