Skip to main content
V.H
Senior
July 20, 2021
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
July 20, 2021

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
July 20, 2021

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