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

Author Topic: Mirrored text  (Read 4294 times)

0 Members and 1 Guest are viewing this topic.

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Mirrored text
« on: May 20, 2009, 01:12:11 am »
Is it possible to mirror sf::String? I expected SetScale(-1.0f, 1.0f) to do it, but it seems to have no effect.

Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Mirrored text
« Reply #1 on: May 20, 2009, 11:01:20 am »
It's currently not possible.
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Mirrored text
« Reply #2 on: May 20, 2009, 07:56:21 pm »
Could there be done something by modifying the glViewport? If a direct way was too intrusive, creating a new derivate of sf::Drawable might be an alternative - assumed that you get enough control about viewport, but for this I know too little about SFML internals.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Mirrored text
« Reply #3 on: May 20, 2009, 08:18:21 pm »
I guess you can setup a mirrored sf::View and use it to draw your string, but I'm not sure about the result.
Laurent Gomila - SFML developer

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Mirrored text
« Reply #4 on: May 21, 2009, 02:50:24 am »
Is there any chance that in the future SetScale(-1) will work for mirroring? It should just be a small change in the way your matrices are calculated.

Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Mirrored text
« Reply #5 on: May 21, 2009, 09:17:16 am »
I don't really remember why, but negative scales were disallowed on purpose.
Laurent Gomila - SFML developer

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Mirrored text
« Reply #6 on: May 21, 2009, 09:22:48 am »
So any chance of changing it? A negative glScalef does mirror, so some people might expect it.

It's a bit annoying to have to change the view port to mirror something.

Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Mirrored text
« Reply #7 on: May 21, 2009, 09:50:12 am »
Ok, I'll think about it.
Laurent Gomila - SFML developer