From d80386a8ab272b2e95ca8dcbf0d3bfe845e0e730 Mon Sep 17 00:00:00 2001
From: "Egli Adrian (IT-SCI-API-PFI)" <adrian.egli@sbb.ch>
Date: Wed, 24 Jul 2019 06:54:16 +0200
Subject: [PATCH] #119 is_raster removed ( simpilified )

---
 flatland/utils/graphics_layer.py | 3 ---
 flatland/utils/graphics_pil.py   | 3 ---
 flatland/utils/rendertools.py    | 2 +-
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/flatland/utils/graphics_layer.py b/flatland/utils/graphics_layer.py
index de2e8618..b2dac463 100644
--- a/flatland/utils/graphics_layer.py
+++ b/flatland/utils/graphics_layer.py
@@ -9,9 +9,6 @@ class GraphicsLayer(object):
     def open_window(self):
         pass
 
-    def is_raster(self):
-        return True
-
     def plot(self, *args, **kwargs):
         pass
 
diff --git a/flatland/utils/graphics_pil.py b/flatland/utils/graphics_pil.py
index f8920afd..cf91cd67 100644
--- a/flatland/utils/graphics_pil.py
+++ b/flatland/utils/graphics_pil.py
@@ -274,9 +274,6 @@ class PILSVG(PILGL):
         self.load_rail()
         self.load_agent()
 
-    def is_raster(self):
-        return False
-
     def process_events(self):
         time.sleep(0.001)
 
diff --git a/flatland/utils/rendertools.py b/flatland/utils/rendertools.py
index 4aca5c38..d3619572 100644
--- a/flatland/utils/rendertools.py
+++ b/flatland/utils/rendertools.py
@@ -403,7 +403,7 @@ class RenderTool(object):
         """ Draw the environment using the GraphicsLayer this RenderTool was created with.
             (Use show=False from a Jupyter notebook with %matplotlib inline)
         """
-        if not self.gl.is_raster():
+        if type(self.gl) is PILSVG:
             self.render_env_svg(show=show,
                                 show_observations=show_observations,
                                 show_predictions=show_predictions,
-- 
GitLab