Drawing a circleshape to a renderwindow when the window has a title bar the size / scaling is to big. If the windows has sf:style::None (removing the title bar) the shape is rendered correctly. It appears the circleshape is being scaled to fit the windows size including the size of the title bar. A printf of the window size displays the correct size in both cases. See an image illustrating the issue below.
Has anyone else experienced this issue? or have a solution?
Environment
Lenovo P50s Laptop
Display Adapter: Intel HD Graphics 520 (driver version 21.20.16.4678)
Windows 10 (version 10.0.16299.64)
Visual Studio 2017
SFML 2.4.2 (64x)
Here is the Main.cpp
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200),"SFML works!", sf::Style::None);
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear(sf::Color::Magenta);
window.draw(shape);
window.display();
}
return 0;
}