Skip to content
Snippets Groups Projects
Commit ea66d5d3 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

QTSVG renderer can resize and move the window to the screen center :-)

parent 12924c5a
No related branches found
No related tags found
No related merge requests found
......@@ -162,17 +162,17 @@ if False:
demo_001.run_demo()
demo_001 = None
demo_000 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_network_000.pkl'))
demo_000.run_demo()
demo_000 = None
demo_000 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_network_000.pkl'))
demo_000.run_demo()
demo_000 = None
demo_001 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_network_001.pkl'))
demo_001.run_demo()
demo_001 = None
demo_001 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_network_001.pkl'))
demo_001.run_demo()
demo_001 = None
demo_002 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_network_002.pkl'))
demo_002.run_demo()
demo_002 = None
demo_002 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_network_002.pkl'))
demo_002.run_demo()
demo_002 = None
demo_flatland_000 = Demo(Scenario_Generator.load_scenario('./env-data/railway/example_flatland_000.pkl'))
......
......@@ -230,7 +230,7 @@ class QTSVG(GraphicsLayer):
w = np.ceil(width * 0.8 / env.width)
h = np.ceil(height * 0.8 / env.height)
self.wWinMain.resize(env.width * w, env.height * h)
self.wWinMain.move((width - env.width * w) / 2, (height - env.height * h) / 2)
def main2():
gl = QTGL(10, 10)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment