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

Author Topic: Sprite Incorrect Size?  (Read 1658 times)

0 Members and 1 Guest are viewing this topic.

esotericsean

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://seanduran.com
Sprite Incorrect Size?
« on: January 23, 2011, 09:47:38 pm »
Hey guys,

Just learning SFML, have a question about how to load a sprite.

Actually, I can load the image just fine and display it. But it seems like it's making the image slightly smaller (resampling it) when it displays it:



Do I need to set the scale of a sprite when I load it? Here's what my code looks like:



Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite Incorrect Size?
« Reply #1 on: January 23, 2011, 09:49:10 pm »
No they are not scaled. Maybe you're confused by the smooth filter. Try calling image.SetSmooth(false).
Laurent Gomila - SFML developer

esotericsean

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://seanduran.com
Sprite Incorrect Size?
« Reply #2 on: January 23, 2011, 09:57:36 pm »
Ah, success! Thank you very much! :)


 

anything