Wt support HTML5 Canvas in WPaintedWidget
I am using only FF and Chrome
http://www.w3schools.com/html5/html5_ref_canvas.asp
HTML5 canvas.getContext("2d") gives the context and
imgData=ctx.getImageData(0,0,canvas.width,canvas.height);
red = imgData.data[0];
green= imgData.data[1];
blue = imgData.data[2];
alpha= imgData.data[3];
If i have mousePosition from wt
WMouseEvent event
imgDataFromWt =ctx.getImageData(event.widget().x, event.widget().y, 1, 1);
This psudeo code is not possible because I can access a ctx from Wt
Also this isnt a good idea.
Is there any better way to do this in Wt??
On Sun, Jul 29, 2012 at 12:03 AM, Spatial Minds <
[email protected]> wrote:
> 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
>
>
--
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