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

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

0 Members and 2 Guests 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: 32498
    • 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.