From 126ab648081b04ec7836591de3938d52a08fc3b5 Mon Sep 17 00:00:00 2001 From: Fabrice Salvaire Date: Wed, 30 Jan 2019 17:23:58 +0100 Subject: [PATCH] cleanup --- Patro/GeometryEngine/Path.py | 2 +- examples/file-format/svg/test-svg-import.py | 33 ++++----------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/Patro/GeometryEngine/Path.py b/Patro/GeometryEngine/Path.py index 6bde532..6ba28d0 100644 --- a/Patro/GeometryEngine/Path.py +++ b/Patro/GeometryEngine/Path.py @@ -939,7 +939,7 @@ class Path2D(Primitive2DMixin, Primitive1P): def apply_transformation(self, transformation): - self._logger.info(str(self) + '\n' + str(transformation.type) + '\n' + str(transformation) ) + # self._logger.info(str(self) + '\n' + str(transformation.type) + '\n' + str(transformation) ) for part in self._parts: # print(part) diff --git a/examples/file-format/svg/test-svg-import.py b/examples/file-format/svg/test-svg-import.py index aadc6a2..9aba8d4 100644 --- a/examples/file-format/svg/test-svg-import.py +++ b/examples/file-format/svg/test-svg-import.py @@ -97,24 +97,8 @@ class SceneImporter(SvgFileInternal): def on_graphic_item(self, item): - # if item.id not in ( - # 'path12061', - # 'path12069', - # 'path12077', - # 'path12085', - # ): - # return - # if item.id not in ( - # 'rounded-rectangle', - # 'polygon', - # ): - # return - # from Patro.FileFormat.Svg.SvgFormat import PathDataAttribute - # self._logger.info(str(item.id) + '\n' + str(item.path_data)) - # item.path_data = PathDataAttribute.to_geometry(item.path_data) - state = self._dispatcher.state.clone().merge(item) - self._logger.info('Item: {}\n{}'.format(item.id, item)) + # self._logger.info('Item: {}\n{}'.format(item.id, item)) # self._logger.info('Item State:\n' + str(state)) self._item_counter += 1 @@ -131,22 +115,15 @@ class SceneImporter(SvgFileInternal): ) transformation = self._screen_transformation * state.transform - # transformation = state.transform - self._logger.info('Sate Transform\n' + str(transformation)) + # self._logger.info('Sate Transform\n' + str(transformation)) if isinstance(item, SvgFormat.Path): # and state.stroke_dasharray is None path = item.path_data - if path is not None: # Fixme: - # self._logger.info(str(item.id) + '\n' + str(path[0].geometry)) - path = path.transform(transformation) - self._update_bounding_box(path) - # self._logger.info('after ' + str(item.id) + '\n' + str(path[0].geometry)) - self._scene.add_path(path, path_style) elif isinstance(item, SvgFormat.Rect): path = item.geometry - path = path.transform(transformation) - self._update_bounding_box(path) - self._scene.add_path(path, path_style) + path = path.transform(transformation) + self._update_bounding_box(path) + self._scene.add_path(path, path_style) #################################################################################################### -- GitLab