Commit 126ab648 authored by Fabrice Salvaire's avatar Fabrice Salvaire

cleanup

parent 4fec6da5
......@@ -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)
......
......@@ -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)
####################################################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment