diff options
| author | Kaalleen <reni@allenka.de> | 2021-06-28 20:05:50 +0200 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2021-06-28 20:05:50 +0200 |
| commit | ecacb9829e9c2b7050486707211f9d176aafdf75 (patch) | |
| tree | f6f30f9707a9c3f603ce896b0b95dbe5c4b13dc1 /lib/extensions/group_commands.py | |
| parent | 2f54ff2a436f2774bfdc730b6e95c43f18ed81ac (diff) | |
pattern markers
Diffstat (limited to 'lib/extensions/group_commands.py')
| -rw-r--r-- | lib/extensions/group_commands.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/extensions/group_commands.py b/lib/extensions/group_commands.py deleted file mode 100644 index af1f9fb1..00000000 --- a/lib/extensions/group_commands.py +++ /dev/null @@ -1,41 +0,0 @@ -# Authors: see git history -# -# Copyright (c) 2010 Authors -# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. - -import inkex -from lxml import etree - -from ..commands import GROUP_COMMANDS, ensure_symbol, get_command_description -from ..i18n import _ -from ..svg import get_correction_transform -from ..svg.tags import INKSCAPE_LABEL, SVG_USE_TAG, XLINK_HREF -from .commands import CommandsExtension - - -class GroupCommands(CommandsExtension): - COMMANDS = GROUP_COMMANDS - - def effect(self): - commands = [command for command in self.COMMANDS if getattr(self.options, command)] - - if not commands: - inkex.errormsg(_("Please choose one or more commands to add.")) - return - - correction_transform = get_correction_transform(self.svg.get_current_layer(), child=True) - - for i, command in enumerate(commands): - ensure_symbol(self.document, command) - - etree.SubElement(self.svg.get_current_layer(), SVG_USE_TAG, - { - "id": self.uniqueId("use"), - INKSCAPE_LABEL: _("Ink/Stitch Command") + ": %s" % get_command_description(command), - XLINK_HREF: "#inkstitch_%s" % command, - "height": "100%", - "width": "100%", - "x": str(i * 20), - "y": "-10", - "transform": correction_transform - }) |
