From 8ab9f35a289571d5ebf8954abe037d913fa4e002 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Fri, 3 Feb 2017 06:46:32 -0500 Subject: extensions.export.win32vectorprint. compensate for svg document units (Bug 1660474) Fixed bugs: - https://launchpad.net/bugs/1660474 (bzr r15468) --- share/extensions/print_win32_vector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/extensions/print_win32_vector.py b/share/extensions/print_win32_vector.py index 7151a3f88..984a10eed 100755 --- a/share/extensions/print_win32_vector.py +++ b/share/extensions/print_win32_vector.py @@ -35,6 +35,7 @@ import simplestyle import simpletransform import cubicsuperpath +inkex.localize() # Initialize gettext if not inkex.sys.platform.startswith('win'): exit(_("sorry, this will run only on Windows, exiting...")) @@ -61,7 +62,7 @@ class MyEffect(inkex.Effect): if style['stroke'] and style['stroke'] != 'none' and style['stroke'][0:3] != 'url': rgb = simplestyle.parseColor(style['stroke']) if style.has_key('stroke-width'): - stroke = self.unittouu(style['stroke-width']) + stroke = self.unittouu(style['stroke-width'])/self.unittouu('1px') stroke = int(stroke*self.scale) if style.has_key('fill'): if style['fill'] and style['fill'] != 'none' and style['fill'][0:3] != 'url': @@ -198,6 +199,7 @@ class MyEffect(inkex.Effect): exit() # user clicked Cancel self.scale = (ord(pDevMode[58]) + 256.0*ord(pDevMode[59]))/96 # use PrintQuality from DEVMODE + self.scale /= self.unittouu('1px') self.groupmat = [[[self.scale, 0.0, 0.0], [0.0, self.scale, 0.0]]] doc = self.document.getroot() self.process_group(doc) -- cgit v1.2.3