From: Antonio Ospite Date: Thu, 28 Jun 2018 14:46:16 +0000 (+0200) Subject: svg_hexaflexagon_editor: coding style fixes X-Git-Url: https://git.ao2.it/flexagon-toolkit.git/commitdiff_plain/aabf42f895331f171651e971661d4d7ace18e0d8 svg_hexaflexagon_editor: coding style fixes Make some lines shorter. --- diff --git a/src/svg_hexaflexagon_editor.py b/src/svg_hexaflexagon_editor.py index d64468b..cb65088 100755 --- a/src/svg_hexaflexagon_editor.py +++ b/src/svg_hexaflexagon_editor.py @@ -61,7 +61,9 @@ class SvgwriteHexaflexagonDiagram(HexaflexagonDiagram): # Draw some default content old_active_group = self.backend.active_group self.backend.active_group = self.groups["hexagon%d-content" % hexagon.index] - self.backend.draw_regular_polygon(cx, cy, 6, self.hexagon_radius, fill_color=(0.5, 0.5, 0.5, 0.2), stroke_color=None) + self.backend.draw_regular_polygon(cx, cy, 6, self.hexagon_radius, + stroke_color=None, + fill_color=(0.5, 0.5, 0.5, 0.2)) self.backend.active_group = old_active_group # Add folding guides @@ -71,9 +73,12 @@ class SvgwriteHexaflexagonDiagram(HexaflexagonDiagram): for triangle in hexagon.triangles: cx, cy = self.get_triangle_center(triangle) theta = triangle.get_angle_in_hexagon() - self.backend.draw_regular_polygon(cx, cy, 3, self.triangle_radius, theta, (0, 0, 0, 0.2)) + self.backend.draw_regular_polygon(cx, cy, 3, self.triangle_radius, theta, + stroke_color=(0, 0, 0, 0.2), + fill_color=None) polygon = self.backend.active_group.elements[-1] - polygon['id'] = "hexagon%d-triangle%d-folding" % (triangle.hexagon.index, triangle.index) + polygon['id'] = "hexagon%d-triangle%d-folding" % (triangle.hexagon.index, + triangle.index) self.backend.active_group = old_active_group