Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Fade out image  (Read 2019 times)

0 Members and 1 Guest are viewing this topic.

Joshua Flynn

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Fade out image
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Fade out image
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Joshua Flynn

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Re: Fade out image
« Reply #2 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!

 

anything