diff options
| author | Alvin Penner <penner@vaxxine.com> | 2017-02-03 11:46:32 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2017-02-03 11:46:32 +0000 |
| commit | 8ab9f35a289571d5ebf8954abe037d913fa4e002 (patch) | |
| tree | c8bff8181a84eca07bc54dbd7a3bdc727a90ee15 | |
| parent | Translations: Update inkscape.pot file (diff) | |
| download | inkscape-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-x | share/extensions/print_win32_vector.py | 4 |
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) |
