Skip to main content
V.H
Senior
Jul 20, 2021 2:28 AM UTC
Solved

The image gradually darkens

Hi,

I want to make a big image gradually darken, I used setAlpha() and invalidate() function in handleTickEvent(), but frequent use of setAlpha() and invalidate() function slows down tick time.

Is there a better way to implement this feature?

This topic has been closed for replies.
Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
Jul 20, 2021 7:17 AM UTC

Hi,

Not at the moment unfortunately. The workaround for a big image would be to slow down a bit the darkening (instead of every tick you darken it every 2 ticks for example). Or reduce the amount of steps.

/Romain

1 reply

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
Jul 20, 2021 7:17 AM UTC

Hi,

Not at the moment unfortunately. The workaround for a big image would be to slow down a bit the darkening (instead of every tick you darken it every 2 ticks for example). Or reduce the amount of steps.

/Romain