SFML community forums

Help => Graphics => Topic started by: Joshua Flynn on November 21, 2013, 05:08:49 pm

Title: Fade out image
Post by: Joshua Flynn on November 21, 2013, 05:08:49 pm
I've got a loaded .png intro image. What's the easiest way to make it fade out to black using timers?

I want to try to avoid real-time image manipulation if possible as I find it resource intensive.
Title: Re: Fade out image
Post by: eXpl0it3r on November 21, 2013, 05:13:50 pm
You can simply call setColor on a sprite and step by step decrease the alpha value or the all the color values, till you reach black.
Title: Re: Fade out image
Post by: Joshua Flynn on November 21, 2013, 05:40:00 pm
You can simply call setColor on a sprite and step by step decrease the alpha value or the all the color values, till you reach black.

Thank you, this worked brilliantly!