📜 ⬆️ ⬇️

Winter tale in your Android'e

“Often the Snow Queen flies through the city streets at night and looks out of the windows, so they are covered with frost patterns like flowers.”




So begins the famous winter fairy tale, which I recently read, wrapped in a warm blanket, right on the Catholic Christmas Eve. The idea that later visited me, as it turned out, was already somehow realized by some people. And yet I wanted to do something that could please the child to the New 2013th, since the end of the world fireworks were ordered to live long.
')
Therefore, I present to your attention Frosty Touch:





From a development point of view, everything seems to be simple. There are 2 canvas, which draws a picture of the original and the second with the effect. The effect is a few image layers, which are necessary to create a more beautiful wipe than the one we get in a blunt way by changing the value of the alpha channel. So, at first I thought that it would be difficult to draw at once in three layers, changing the alpha of each to varying degrees, because the java android is not too joking to itself. However, after carrying out proper optimization, I was able to achieve not only a continuous line, but drawing in circles, as many "competitors" do, but also a good speed of work. If you have questions, I will gladly answer, write!

I hope the application will give pleasure even to those who are in the south, and who now have no snow, but solid ice :)

With the coming, and for someone with the already arrived, dear to Habr!

Source: https://habr.com/ru/post/164507/


All Articles