From e08e21e37fbb8080bbc115fb1c396e4818d2af47 Mon Sep 17 00:00:00 2001 From: Erik Nygren <erik.nygren@sbb.ch> Date: Mon, 15 Jul 2019 08:56:24 -0400 Subject: [PATCH] fixed issues with editor with refactored rendertools.py removed prints for debugging --- flatland/utils/graphics_pil.py | 3 ++- notebooks/Scene_Editor.ipynb | 35 ++-------------------------------- 2 files changed, 4 insertions(+), 34 deletions(-) diff --git a/flatland/utils/graphics_pil.py b/flatland/utils/graphics_pil.py index a6835902..f8920afd 100644 --- a/flatland/utils/graphics_pil.py +++ b/flatland/utils/graphics_pil.py @@ -221,7 +221,8 @@ class PILGL(GraphicsLayer): def save_image(self, filename): """ Renders the current scene into a image file - :param filename: filename where to store the rendering output_generator (supported image format *.bmp , .. , *.png) + :param filename: filename where to store the rendering output_generator + (supported image format *.bmp , .. , *.png) """ img = self.alpha_composite_layers() img.save(filename) diff --git a/notebooks/Scene_Editor.ipynb b/notebooks/Scene_Editor.ipynb index 1eeceb57..877f8200 100644 --- a/notebooks/Scene_Editor.ipynb +++ b/notebooks/Scene_Editor.ipynb @@ -11,20 +11,7 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<style>.container { width:95% !important; }</style>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "from IPython.core.display import display, HTML\n", "display(HTML(\"<style>.container { width:95% !important; }</style>\"))" @@ -70,7 +57,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "8f5b5ed248ec4cd7a4410ff504b67949", + "model_id": "bd784815032c4d89803fa93399def9cf", "version_major": 2, "version_minor": 0 }, @@ -80,24 +67,6 @@ }, "metadata": {}, "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "redrawing outside\n", - "Output()\n", - "redrawing outside\n", - "Output()\n", - "redrawing outside\n", - "Output(outputs=({'output_type': 'stream', 'text': 'load file: complex_scene.pkl\\nRegenerate size 50 20\\n', 'name': 'stdout'},))\n", - "redrawing outside\n", - "Output(outputs=({'output_type': 'stream', 'text': 'load file: complex_scene.pkl\\nRegenerate size 50 20\\n', 'name': 'stdout'},))\n", - "redrawing outside\n", - "Output(outputs=({'output_type': 'stream', 'text': 'load file: complex_scene.pkl\\nRegenerate size 50 20\\n', 'name': 'stdout'},))\n", - "redrawing outside\n", - "Output(outputs=({'output_type': 'stream', 'text': 'load file: complex_scene.pkl\\nRegenerate size 50 20\\n', 'name': 'stdout'},))\n" - ] } ], "source": [ -- GitLab