Problem with fade_in and fade_out methods

Started by froggy77, October 04, 2015, 06:53:51 PM

Previous topic - Next topic
October 04, 2015, 06:53:51 PM Last Edit: October 04, 2015, 09:56:05 PM by froggy77
Hello,

I don't know if there is a bug with the following methods:
drawable:fade_in([delay], [callback])
and
drawable:fade_out([delay], [callback])

I make maybe some mistakes in the use of these methods. :-[
These methods work, but at the end, the chosen colors are not exactly the same.
When I picked the color in an image editor (e.g. Gimp), I can see it's darker.
It is as if the surface kept a little transparency at the end of my fade_in() . Even when I used surface:clear()

So instead of writing this,
self.bg_surface:fade_in()

I write this:
self.bg_surface:fade_in(20, function () self.bg_surface:set_opacity(255) end)

This workaround may not work with text_surface, because there is no text_surface:set_opacity(opacity)
Is there a solution?