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

Author Topic: Problem with drawing sprites  (Read 2541 times)

0 Members and 1 Guest are viewing this topic.

MahanGM

  • Newbie
  • *
  • Posts: 18
    • Yahoo Instant Messenger - mahan_pro2000
    • View Profile
    • http://www.df-gamez.com
Problem with drawing sprites
« on: February 26, 2011, 07:40:57 pm »
Hi. First thanks for your great library. I'm a new game developer in c++ and SFML. I'm professional in game making but with use of Visual Engines like Unity or UDK.

I wanna to ask why my sprite get a yellow border when I rotate it. I using a transparented PNG image and think I should use a bitmap image using keycolor to transparent the background but maybe there will be a better solution to do with the PNG one.

picture will tell all the issue:
This is a land of broken hearts, where bullets shatter dreams (50 Cent)

Lupinius

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Problem with drawing sprites
« Reply #1 on: February 26, 2011, 09:26:40 pm »
Try SetSmooth(false) on the image.

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Problem with drawing sprites
« Reply #2 on: February 26, 2011, 09:29:35 pm »
My guess would be that your image has those yellow lines to make it more antialiased, but they are unoticed when the line is straight vertical/horizontal. When you start rotating, those lines become pixelated, and more noticeable.

Hope that's it as i can't see any other way that would make a border like that only when rotating.

EDIT: ofc, or SetSmooth() as previously said :)

MahanGM

  • Newbie
  • *
  • Posts: 18
    • Yahoo Instant Messenger - mahan_pro2000
    • View Profile
    • http://www.df-gamez.com
Problem with drawing sprites
« Reply #3 on: February 27, 2011, 11:41:33 am »
Thanks ! It works. But the image isn't smooth more longer. No matter ! thanks again.  :)
This is a land of broken hearts, where bullets shatter dreams (50 Cent)

 

anything