From f5c85183d9c874fca806917e50992daea4101496 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Wed, 14 Nov 2018 20:23:06 -0500 Subject: basic lettering (#344) Can handle multiple lines of text and routes the stitching in alternating directions on each line. --- lib/extensions/layer_commands.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'lib/extensions/layer_commands.py') 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)] -- cgit v1.2.3