1
Graphics / Re: [SFML2] sf::Sprite::getGlobalBounds() bigger than source image?
« on: May 24, 2012, 05:19:20 pm »
I found the problem, it was some buggy code by me.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
The points in local coordinates are:
- (0, 0)
- (0, sprite.GetSubRect().GetHeight())
- (sprite.GetSubRect().GetWidth(), 0)
- (sprite.GetSubRect().GetWidth(), sprite.GetSubRect().GetHeight())
The points in global coordinates are:
- sprite.TransformToGlobal(px)
where px is one of the local points.
Generally, you should always include the headers you need (here the one for sf::Event) and not rely on other headers to include them automatically.