Hi,
How to get the current mouse over pixel color using corona SDK.
I have loaded an image in the screen. it has various colors. i want to get the color code of the current mouse pointer/ Touch pixel.
Thanks in advance.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Hi,
How to get the current mouse over pixel color using corona SDK.
I have loaded an image in the screen. it has various colors. i want to get the color code of the current mouse pointer/ Touch pixel.
Thanks in advance.
You cannot grab pixel color. Sorry.
Peach
Thanks for you quick response peach.
I am developing a Map learning app. Just mapping the country with the map outline. Each countries has s solid colored PNG images. i plan to check the pixel color and compare it to the country solid color.
Is there any alternate approach / API available to do this.
Thanks
Prasanna
You could state the colors for each country png. Eg; australia.color = "peach" and then compare it to the outline color. (Which you'd also set a .color = "whatever" for).
Is that an option?
Peach :)
Hi,
The country images are PNG rectangle in shapes. The county outline has been filled with solid color. the remaining area of the rectangle in filled with clear color. So its not possible to compare with the Outline color.
Thanks.
Prasanna
I'm not sure what your goal is, you mentioned comparing colors - and I believe that may be achieved by setting a .color = "whatever" property on each object you hope to compare to any other.