I don't really know how to phrase it otherwise. This happens with both rectangle shapes and circular shapes(haven't tested other shapes).
This is a grid in my game, with the player and zombie running across it. The big circle is an obstacle, and should be drawn right in the middle of the screen.
Here's the piece of code that draws it:
sf::Vector2f pos = circ->getCenter();
sf::CircleShape c;
c.setRadius(circ->getRadius());
c.move(-c.getRadius(),-c.getRadius());
data->win.draw(c);
circ is an object that represents a circle, with a center and a radius. data->win is a RenderWindow.
I checked in the debugger, nothing wrong with the pos variable, just 400,300. As it should be, because I put the circle right in the middle of the screen, which is 800x600. I tested the value I'm sending setRadius, and it is 200, as to be expected.
But it still is drawn incorrectly, slightly to the left and a tad bit too small. The same happens with my rectangular objects. Anyone got any ideas why this happens? I'm really out of ideas now.
Edit:
If I leave out the c.move statement, it's position is already slightly to the left from where you would excpect it to be(while the position I put it in still is 400,300, so nice in the middle of the screen).