2017년 6월 22일 목요일

get a image sprite colour


my app have a image sprite1 in a canvas. The sprite changes 80 pictures witch show the earth rotation.

Each country of the images have his own colour.

Now i want via colour to go in the selected country, but i dont know how can i realize this?

Is there someone who have a idea, how i can do this.
If this not possible to do this with colours, how can i realize this in a other way ? 

I think its very difficult to realize it with coordinates, because of the 80 pictures. On each picture the country is on a different coordinate...

--
In a matter of about 5 minutes I found some ready-made solutions that may work for you.
Search Google Images for 'world globe', 'spinning globe', etc.
And under Search Tools, Type you can select 'Animated' to filter the results further to include mostly animated gif files.
A gif file can be separated into it's different picture frames (ie. via GIMP image editor) then animated in MITAI with my general animation snippet.


--
thanks for your answer.

My problem is not to create a globus. I have made them with gimp by myself (with colours for each country).

My problem is how to get the toucht colour so i can then go in these chosen country???

--
Use the call Canvas.getPixelColor block. That gives you the color of the thing you touched on at that point.
There is also GetBackGroundPixelColr, which gives you the color at that point of the canvas.

--
As Ghica said those are your options.
The difference between the two is GetBackgroundPixelColor ignores sprites so if your globe Pictures are in an ImageSprite, use GetPixelColor instead which 'sees' the ImageSprite colors.
If your were animating the Canvas BackgroundImage then you could use GetBackgroundPixelColor.

--
Thanks o lot. Now i can solve my problem.

--

댓글 없음:

댓글 쓰기