SFML community forums

Help => Graphics => Topic started by: Imbue on May 20, 2009, 01:12:11 am

Title: Mirrored text
Post by: Imbue 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.
Title: Mirrored text
Post by: Laurent on May 20, 2009, 11:01:20 am
It's currently not possible.
Title: Mirrored text
Post by: Nexus 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.
Title: Mirrored text
Post by: Laurent 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.
Title: Mirrored text
Post by: Imbue 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.
Title: Mirrored text
Post by: Laurent on May 21, 2009, 09:17:16 am
I don't really remember why, but negative scales were disallowed on purpose.
Title: Mirrored text
Post by: Imbue 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.
Title: Mirrored text
Post by: Laurent on May 21, 2009, 09:50:12 am
Ok, I'll think about it.