diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2020-04-25 14:45:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-25 14:45:27 +0200 |
| commit | 319905087661bc44a560afff6c574b6545d21115 (patch) | |
| tree | 249f7c5ff6f023df1a1bdd3933b7bc0377232658 /lib/svg/rendering.py | |
| parent | 1d3b89111e627b3662a7ec2749bb3dcfe694be66 (diff) | |
Namespaced Attributes (#657)
Diffstat (limited to 'lib/svg/rendering.py')
| -rw-r--r-- | lib/svg/rendering.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/svg/rendering.py b/lib/svg/rendering.py index 2711f12a..5860ceef 100644 --- a/lib/svg/rendering.py +++ b/lib/svg/rendering.py @@ -5,10 +5,11 @@ import simplepath import simplestyle import simpletransform -from .tags import INKSCAPE_GROUPMODE, INKSCAPE_LABEL, SVG_DEFS_TAG, SVG_GROUP_TAG, SVG_PATH_TAG -from .units import PIXELS_PER_MM, get_viewbox_transform from ..i18n import _ from ..utils import Point, cache +from .tags import (INKSCAPE_GROUPMODE, INKSCAPE_LABEL, INKSTITCH_ATTRIBS, + SVG_DEFS_TAG, SVG_GROUP_TAG, SVG_PATH_TAG) +from .units import PIXELS_PER_MM, get_viewbox_transform # The stitch vector path looks like this: # _______ @@ -198,6 +199,7 @@ def color_block_to_paths(color_block, svg, destination, visual_commands): add_commands(Stroke(destination[-1]), ["trim"]) color = color_block.color.visible_on_white.to_hex_str() + path = inkex.etree.Element(SVG_PATH_TAG, { 'style': simplestyle.formatStyle({ 'stroke': color, @@ -206,7 +208,7 @@ def color_block_to_paths(color_block, svg, destination, visual_commands): }), 'd': "M" + " ".join(" ".join(str(coord) for coord in point) for point in point_list), 'transform': get_correction_transform(svg), - 'embroider_manual_stitch': 'true' + INKSTITCH_ATTRIBS['manual_stitch']: 'true' }) destination.append(path) |
