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

Author Topic: Reverse text  (Read 2423 times)

0 Members and 1 Guest are viewing this topic.

mongrol

  • Newbie
  • *
  • Posts: 29
    • View Profile
Reverse text
« on: July 18, 2009, 12:59:56 pm »
Hi folks,
I'd like to draw some reverse text but I can't figure out how to do it. My screen background is black with some white text. In order to reverse the text I can set the text.SetColor to black but how do I set the background of the drawable to white? Is this possible?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Reverse text
« Reply #1 on: July 18, 2009, 01:01:16 pm »
The text doesn't have a background, you'll have to draw a rectangle behind it.
Laurent Gomila - SFML developer

mongrol

  • Newbie
  • *
  • Posts: 29
    • View Profile
Reverse text
« Reply #2 on: July 18, 2009, 01:05:52 pm »
That was quick! Thanks. I'll do that.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Reverse text
« Reply #3 on: July 19, 2009, 12:14:39 am »
If you want the whole window to be white, pass an sf::Color instance to the sf::RenderWindow::Clear() function.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: