diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 13:37:01 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 17:36:48 +0100 |
| commit | 86bca81e753786e0b4e9e9d49e88f0f2a579ebba (patch) | |
| tree | 960d72104b1347b5a2133d5483251181b6ed87f2 /debug_draw.py | |
| parent | 11e50657c900543856f3a1f56a96d6c861f55b6e (diff) | |
| download | tdde25-debug-draw.tar.gz | |
initial debug drawdebug-draw
Diffstat (limited to 'debug_draw.py')
| -rw-r--r-- | debug_draw.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/debug_draw.py b/debug_draw.py new file mode 100644 index 0000000..a47e921 --- /dev/null +++ b/debug_draw.py @@ -0,0 +1,15 @@ +class DebugDraw(): + squares = dict() + + @classmethod + def clear(cls): + cls.squares.clear() + + @classmethod + def add_square(cls, p1, p2, color="#000000"): + cls.squares[(p1, p2)] = color + + @classmethod + def get_squares(cls): + return [{"bounds": corners, "color": color} + for corners, color in cls.squares.items()] |
