SFML community forums
Help => Graphics => Topic started by: SvenB on November 14, 2008, 03:31:06 pm
-
Hi...
for sprites FlipX and FlipY allow to flip them, but for
strings these functions are missing. Unfortunately I
need them. Is there an easy way to get what I need?
Thanks for your help - Sven
-
You can rotate the string to simulate flipping it.
I'm not sure why SFML doesn't allow flipping of sf::String.
In my opinion, you should be allowed to flip sf::Shape too, although that would be complicated to add.
-
In what situation would you need to display flipped text ? :D
-
In what situation would you need to display flipped text ? :D
I'm not a game programmer but I want to use sfml for programming cognitive psychology experiments. For one line of research rotated single characters are displayed 'normal' or as mirror images and subjects were to decide as fast as possible whether the characters are normal or mirror images. Thus, I need to flip the characters to produce mirror images.
Yours - Sven
-
In what situation would you need to display flipped text ? :D
Well, you could use it for mirrored text effects, and shadows. Actually, I'm not sure if classes support them, but FlipX and FlipY would probably be useful for all drawable objects. Skewing would also be pretty neat. I'd find a lot of use in both sets of methods when I get around to writing a sprite and tile editor for my game, and also some in-game effects. :)
-
Yes, text effects would certainly be nice. I thought about this to, if you are able to do a flipY(), then you can easily do web2.0 fluff ground text reflections.
-
When render to texture will be avaiable you could render text to a texture and display it flipped or rotated.
-
Can a negative scale do the trick?
-
Can a negative scale do the trick?
Documentation says for SetScaleX() values must be strictly positive and I tried a negative value: no effect.
-Sven-
-
(http://img293.imageshack.us/img293/7618/testpq1.th.jpg) (http://img293.imageshack.us/my.php?image=testpq1.jpg)(http://img293.imageshack.us/images/thpix.gif) (http://g.imageshack.us/thpix.php)
-
Would you be so kind as to post your code. Thanx.
-Sven-
-
Would you be so kind as to post your code. Thanx.
The image I have posted refers to a my add-on code that is not part of the official SFML library.
Please refer to http://www.sfml-dev.org/forum/viewtopic.php?t=740 post for more informations.