summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsuv-lp <>2017-05-01 07:38:02 +0000
committerJazzyNico <nicoduf@yahoo.fr>2017-05-01 07:38:02 +0000
commitdc0b8a1b7c8a4215335b2b52bf101fcec8bfca03 (patch)
treec8b4fa3de0360e517a69dfc4edbcfdc765fda92d
parentRemove unised signals from previous commit (diff)
downloadinkscape-dc0b8a1b7c8a4215335b2b52bf101fcec8bfca03.tar.gz
inkscape-dc0b8a1b7c8a4215335b2b52bf101fcec8bfca03.zip
[Bug #1680833] Extrude extension changes edge width thickness.
Fixed bugs: - https://launchpad.net/bugs/1680833 (bzr r15657)
-rwxr-xr-xshare/extensions/extrude.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/share/extensions/extrude.py b/share/extensions/extrude.py
index 88ae3994a..b11d0d36c 100755
--- a/share/extensions/extrude.py
+++ b/share/extensions/extrude.py
@@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# local library
import inkex
import simplepath
+import simplestyle
import simpletransform
import cubicsuperpath
@@ -68,10 +69,23 @@ class Extrude(inkex.Effect):
ele = inkex.etree.Element('{http://www.w3.org/2000/svg}path')
paths[0].xpath('..')[0].append(ele)
ele.set('d', simplepath.formatPath(line))
- ele.set('style', 'fill:none;stroke:#000000;stroke-opacity:1;stroke-width:1;')
+ style = {
+ 'fill': 'none',
+ 'stroke': '#000000',
+ 'stroke-opacity': 1,
+ 'stroke-width': self.unittouu('1px'),
+ }
+ ele.set('style', simplestyle.formatStyle(style))
elif self.options.mode.lower() == 'polygons':
g = inkex.etree.Element('{http://www.w3.org/2000/svg}g')
- g.set('style', 'fill:#000000;stroke:#000000;fill-opacity:0.3;stroke-width:2;stroke-opacity:0.6;')
+ style = {
+ 'fill': '#000000',
+ 'fill-opacity': 0.3,
+ 'stroke': '#000000',
+ 'stroke-opacity': 0.6,
+ 'stroke-width': self.unittouu('2px'),
+ }
+ g.set('style', simplestyle.formatStyle(style))
paths[0].xpath('..')[0].append(g)
for comp in verts:
for n,v in enumerate(comp):