Thanks a lot. I managed to solve it.
//------------------------------------------------------------------------------
void cSprite::render(sf::FloatRect _dstRect, float _angle, sf::Color color)
{
if (visible)
{
float angle = _angle / 180.f * (float)M_PI;
float cos = cosf(angle);
float sin = sinf(angle);
m_renderStates.texture = texture;
m_renderStates.blendMode = sf::BlendAlpha;
sf::Vector2f dest[4];
float x0 = - size.x / 2;
float y0 = - size.y / 2;
float x1 = size.x / 2;
float y1 = y0;
float x2 = size.x / 2;
float y2 = size.y / 2;
float x3 = x0;
float y3 = y2;
float fX = _dstRect.width / size.x;
float fY = _dstRect.height / size.y;
float tX = _dstRect.left + _dstRect.width / 2;
float tY = _dstRect.top + _dstRect.height / 2;
dest[0].x = (x0 * cos - y0 * sin) * fX + tX;
dest[0].y = (x0 * sin + y0 * cos) * fY + tY;
dest[1].x = (x1 * cos - y1 * sin) * fX + tX;
dest[1].y = (x1 * sin + y1 * cos) * fY + tY;
dest[2].x = (x2 * cos - y2 * sin) * fX + tX;
dest[2].y = (x2 * sin + y2 * cos) * fY + tY;
dest[3].x = (x3 * cos - y3 * sin) * fX + tX;
dest[3].y = (x3 * sin + y3 * cos) * fY + tY;
m_vertices[0] = sf::Vertex(
dest[0], color,
sf::Vector2f(0, 0)
);
m_vertices[1] = sf::Vertex(
dest[1], color,
sf::Vector2f(size.x, 0)
);
m_vertices[2] = sf::Vertex(
dest[2], color,
sf::Vector2f(size.x, size.y)
);
m_vertices[3] = sf::Vertex(
dest[3], color,
sf::Vector2f(0, size.y)
);
GAME_MANAGER->getWindow()->draw(m_vertices, 4, sf::PrimitiveType::Quads, m_renderStates);
}
}