I'm sure I'm just doing views wrong, but how would I fix this?
This should be a REALLY large image vertically. It seems to hold a 1:1 ratio along the X-Axis, but as you can see... the Y-Axis has been crushed from 90,000 to what look more like 5,000. ;( *tear*
Here is my minimal code that reproduces the error:
I'm getting good at this!
#include <SFML\Graphics.hpp>
int main()
{
sf::RenderWindow Window(sf::VideoMode::GetMode(0), "Laz's Interactive Map");
sf::Shape Map;
Map.AddPoint(0,0,sf::Color(0,100,0));
Map.AddPoint(30000,0,sf::Color(0,100,0));
Map.AddPoint(30000,90000,sf::Color(0,100,0));
Map.AddPoint(0,90000,sf::Color(0,100,0));
Map.EnableFill(true);
Map.EnableOutline(false);
sf::View MainView;
MainView.SetFromRect(sf::FloatRect(0,0,30000,90000));
MainView.Zoom(.4f);
sf::Shape Circle = sf::Shape::Circle(5000,5000,2500,sf::Color::Red, 5, sf::Color::Red);
while (Window.IsOpened()) {
Window.Clear();
Window.SetView(MainView);
Window.Draw(Map);
Window.Draw(Circle);
Window.Display();
}
return 0;
}
PS: I'm am 90% sure that this is a View error... I am VERY sketchy in my views... I never know what I'm doing.
Thanks in advance.