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

Author Topic: sf::Sprite::SetSubRect has no effect  (Read 2145 times)

0 Members and 1 Guest are viewing this topic.

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
sf::Sprite::SetSubRect has no effect
« on: June 23, 2009, 02:21:01 am »
following code still displays the whole sprite:

Code: [Select]

spr.SetSubRect(sf::IntRect(0,0,80,80);
window->Draw(spr);


why?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::Sprite::SetSubRect has no effect
« Reply #1 on: June 23, 2009, 07:48:16 am »
What is the size of the image? Can you show a complete (and short) source code that reproduces the problem?
Laurent Gomila - SFML developer

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
sf::Sprite::SetSubRect has no effect
« Reply #2 on: June 24, 2009, 07:23:07 am »
nevermind, coding at 4.50 am when your brain is not working properly probably isn't  that much of a good idea.