diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-11-14 20:23:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-14 20:23:06 -0500 |
| commit | f5c85183d9c874fca806917e50992daea4101496 (patch) | |
| tree | a2450e2e37a7d94625a917240e78eadc939fd65b /lib/extensions/layer_commands.py | |
| parent | 238ad843dd658de6c7afd5b8697c0e080b1cf965 (diff) | |
basic lettering (#344)
Can handle multiple lines of text and routes the stitching in alternating directions on each line.
Diffstat (limited to 'lib/extensions/layer_commands.py')
| -rw-r--r-- | lib/extensions/layer_commands.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/extensions/layer_commands.py b/lib/extensions/layer_commands.py index 60a5fab2..3a746fcf 100644 --- a/lib/extensions/layer_commands.py +++ b/lib/extensions/layer_commands.py @@ -1,25 +1,15 @@ import inkex -from .commands import CommandsExtension from ..commands import LAYER_COMMANDS, get_command_description from ..i18n import _ -from ..svg.tags import SVG_USE_TAG, INKSCAPE_LABEL, XLINK_HREF from ..svg import get_correction_transform +from ..svg.tags import SVG_USE_TAG, INKSCAPE_LABEL, XLINK_HREF +from .commands import CommandsExtension class LayerCommands(CommandsExtension): COMMANDS = LAYER_COMMANDS - def ensure_current_layer(self): - # if no layer is selected, inkex defaults to the root, which isn't - # particularly useful - if self.current_layer is self.document.getroot(): - try: - self.current_layer = self.document.xpath(".//svg:g[@inkscape:groupmode='layer']", namespaces=inkex.NSS)[0] - except IndexError: - # No layers at all?? Fine, we'll stick with the default. - pass - def effect(self): commands = [command for command in self.COMMANDS if getattr(self.options, command)] |
