diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-15 21:57:03 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-15 21:57:03 +0000 |
| commit | 6bd1c2a30b66e15fe055b22bd47dadb771f7fae2 (patch) | |
| tree | 1b991cc2736f84fb069666802d485bd29cff6394 /share/extensions/seamless_pattern.py | |
| parent | Update to limit options to radius = 0, radious > 0 or both (diff) | |
| parent | fix-bug-1557192. paint-order crash with multiple items (diff) | |
| download | inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.tar.gz inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.zip | |
Update to trunk
(bzr r13645.1.119)
Diffstat (limited to 'share/extensions/seamless_pattern.py')
| -rwxr-xr-x[-rw-r--r--] | share/extensions/seamless_pattern.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/share/extensions/seamless_pattern.py b/share/extensions/seamless_pattern.py index d75fb1063..db8fd8c51 100644..100755 --- a/share/extensions/seamless_pattern.py +++ b/share/extensions/seamless_pattern.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Written by Jabiertxof -# V.05 +# V.06 import inkex, sys, re, os from lxml import etree @@ -24,8 +24,8 @@ class C(inkex.Effect): self.document = etree.parse(os.path.join(path, "seamless_pattern.svg")) root = self.document.getroot() root.set("id", "SVGRoot") - root.set("width", str(width) + 'px') - root.set("height", str(height) + 'px') + root.set("width", str(width)) + root.set("height", str(height)) root.set("viewBox", "0 0 " + str(width) + " " + str(height) ) xpathStr = '//svg:rect[@id="clipPathRect"]' @@ -42,12 +42,11 @@ class C(inkex.Effect): else: designZoneData[0].set("patternTransform", "scale(" + str(10.0/factor) + "," + str(10.0) + ")") - xpathStr = '//svg:g[@id="designTop"] | //svg:g[@id="designBottom"] | //svg:g[@id="transparencyPreview"]' + xpathStr = '//svg:g[@id="designTop"] | //svg:g[@id="designBottom"]' designZone = root.xpath(xpathStr, namespaces=inkex.NSS) if designZone != []: designZone[0].set("transform", "scale(" + str(width/100.0) + "," + str(height/100.0) + ")") designZone[1].set("transform", "scale(" + str(width /100.0) + "," + str(height/100.0) + ")") - designZone[2].set("transform", "scale(" + str(width /100.0) + "," + str(height/100.0) + ")") xpathStr = '//svg:g[@id="designTop"]/child::*' designZoneData = root.xpath(xpathStr, namespaces=inkex.NSS) |
