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

Author Topic: Skewing  (Read 2537 times)

0 Members and 1 Guest are viewing this topic.

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
Skewing
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Skewing
« Reply #1 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.
Laurent Gomila - SFML developer

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
Skewing
« Reply #2 on: July 31, 2010, 05:01:30 am »
"Eventually" works just fine for me. :)

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Skewing
« Reply #3 on: July 31, 2010, 09:41:20 am »
I'm not sure if it's quite the right suggestion, but TurboLento in this thread 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.