SFML community forums

Help => Graphics => Topic started by: Spodi on July 30, 2010, 08:22:55 pm

Title: Skewing
Post by: Spodi on July 30, 2010, 08:22:55 pm
In the past, I have added shadows by just skewing the sprite and drawing it black. That is, take the top two points of the rect, shift them over about 50%, halve the height, then draw it black with alpha. Though I just noticed that there is no native way to do this with SFML.

How would one go about accomplishing this in SFML?
Title: Skewing
Post by: Laurent on July 30, 2010, 09:18:40 pm
It's not possible in SFML, but I agree it would be cool to be able to do it. Maybe for SFML 2.
Title: Skewing
Post by: Spodi on July 31, 2010, 05:01:30 am
"Eventually" works just fine for me. :)
Title: Skewing
Post by: Walker on July 31, 2010, 09:41:20 am
I'm not sure if it's quite the right suggestion, but TurboLento in this thread (http://sfml-dev.org/forum/viewtopic.php?t=2893) managed to get a Mode-7 type effect working. Obviously that's not exactly what you're after but a similar approach might be appropriate.

For the record, I think that sprite/image deformation/skewing would be a suitable and useful feature in SFML.