summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2017-02-03 11:46:32 +0000
committerapenner <penner@vaxxine.com>2017-02-03 11:46:32 +0000
commit8ab9f35a289571d5ebf8954abe037d913fa4e002 (patch)
treec8bff8181a84eca07bc54dbd7a3bdc727a90ee15
parentTranslations: Update inkscape.pot file (diff)
downloadinkscape-8ab9f35a289571d5ebf8954abe037d913fa4e002.tar.gz
inkscape-8ab9f35a289571d5ebf8954abe037d913fa4e002.zip
extensions.export.win32vectorprint. compensate for svg document units (Bug 1660474)
Fixed bugs: - https://launchpad.net/bugs/1660474 (bzr r15468)
-rwxr-xr-xshare/extensions/print_win32_vector.py4
1 files changed, 3 insertions, 1 deletions
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)