开发者

Colour detection on click event.

开发者 https://www.devze.com 2023-04-04 05:23 出处:网络
In my project GWT Java, I need colour detection on click event. When user clicks any where in program window, I need to detect the colour of click point(x,y). How it is possible. Where as keeping in v

In my project GWT Java, I need colour detection on click event. When user clicks any where in program window, I need to detect the colour of click point(x,y). How it is possible. Where as keeping in view 开发者_StackOverflow中文版that there may be no one image in the program window. Thanks.


My first thought was to take a screenshot, and then determine the color information of the pixel at that particular location in the captured image. A little Google-ing turned up this gem: html2canvas - Screenshots with JavaScript.

I haven't used it though, so I can't give you any more help than that, unfortunately.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号