summaryrefslogtreecommitdiffstats
path: root/share/extensions
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-09 17:12:39 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-09 17:12:39 +0000
commit24fec52f30bca03f186a7aa0662e9cc54706b82b (patch)
tree569faf7d97e8bdaead14d4f98bf082efb692e721 /share/extensions
parentmerged anf fixed from trunk (diff)
parentFixed icons files to save circles without 'd' atribute pointed by su_v (diff)
downloadinkscape-24fec52f30bca03f186a7aa0662e9cc54706b82b.tar.gz
inkscape-24fec52f30bca03f186a7aa0662e9cc54706b82b.zip
update to trunk
(bzr r13645.1.40)
Diffstat (limited to 'share/extensions')
-rwxr-xr-xshare/extensions/convert2dashes.py9
-rwxr-xr-xshare/extensions/funcplot.py2
-rwxr-xr-xshare/extensions/pathalongpath.py4
-rwxr-xr-xshare/extensions/pathscatter.py6
4 files changed, 14 insertions, 7 deletions
diff --git a/share/extensions/convert2dashes.py b/share/extensions/convert2dashes.py
index 9e7f6d439..1228b247c 100755
--- a/share/extensions/convert2dashes.py
+++ b/share/extensions/convert2dashes.py
@@ -54,17 +54,24 @@ class SplitIt(inkex.Effect):
for id, node in self.selected.iteritems():
if node.tag == inkex.addNS('path','svg'):
dashes = []
+ offset = 0
style = simplestyle.parseStyle(node.get('style'))
if style.has_key('stroke-dasharray'):
if style['stroke-dasharray'].find(',') > 0:
dashes = [float (dash) for dash in style['stroke-dasharray'].split(',')]
+ if style.has_key('stroke-dashoffset'):
+ offset = style['stroke-dashoffset']
if dashes:
p = cubicsuperpath.parsePath(node.get('d'))
new = []
for sub in p:
idash = 0
dash = dashes[0]
- length = 0
+ length = float (offset)
+ while dash < length:
+ length = length - dash
+ idash = (idash + 1) % len(dashes)
+ dash = dashes[idash]
new.append([sub[0][:]])
i = 1
while i < len(sub):
diff --git a/share/extensions/funcplot.py b/share/extensions/funcplot.py
index 606fb0c28..f37bf335e 100755
--- a/share/extensions/funcplot.py
+++ b/share/extensions/funcplot.py
@@ -45,7 +45,7 @@ def drawfunction(xstart, xend, ybottom, ytop, samples, width, height, left, bott
# coords and scales based on the source rect
if xstart == xend:
- inkex.errormsg(_("x-interval cannot be zero. Please modify 'Start X value' or 'End X alue'"))
+ inkex.errormsg(_("x-interval cannot be zero. Please modify 'Start X value' or 'End X value'"))
return []
scalex = width / (xend - xstart)
xoff = left
diff --git a/share/extensions/pathalongpath.py b/share/extensions/pathalongpath.py
index 7da7f1797..234430acd 100755
--- a/share/extensions/pathalongpath.py
+++ b/share/extensions/pathalongpath.py
@@ -66,7 +66,7 @@ def stretch(pathcomp,xscale,yscale,org):
def linearize(p,tolerance=0.001):
'''
- This function recieves a component of a 'cubicsuperpath' and returns two things:
+ This function receives a component of a 'cubicsuperpath' and returns two things:
The path subdivided in many straight segments, and an array containing the length of each segment.
We could work with bezier path as well, but bezier arc lengths are (re)computed for each point
@@ -153,7 +153,7 @@ class PathAlongPath(pathmodifier.Diffeo):
def lengthtotime(self,l):
'''
Recieves an arc length l, and returns the index of the segment in self.skelcomp
- containing the coresponding point, to gether with the position of the point on this segment.
+ containing the corresponding point, to gether with the position of the point on this segment.
If the deformer is closed, do computations modulo the toal length.
'''
diff --git a/share/extensions/pathscatter.py b/share/extensions/pathscatter.py
index 268e31069..5c2857979 100755
--- a/share/extensions/pathscatter.py
+++ b/share/extensions/pathscatter.py
@@ -80,7 +80,7 @@ def stretch(pathcomp,xscale,yscale,org):
def linearize(p,tolerance=0.001):
'''
- This function recieves a component of a 'cubicsuperpath' and returns two things:
+ This function receives a component of a 'cubicsuperpath' and returns two things:
The path subdivided in many straight segments, and an array containing the length of each segment.
We could work with bezier path as well, but bezier arc lengths are (re)computed for each point
@@ -186,7 +186,7 @@ class PathScatter(pathmodifier.Diffeo):
def lengthtotime(self,l):
'''
Recieves an arc length l, and returns the index of the segment in self.skelcomp
- containing the coresponding point, to gether with the position of the point on this segment.
+ containing the corresponding point, to gether with the position of the point on this segment.
If the deformer is closed, do computations modulo the toal length.
'''
@@ -203,7 +203,7 @@ class PathScatter(pathmodifier.Diffeo):
def localTransformAt(self,s,follow=True):
'''
- recieves a length, and returns the coresponding point and tangent of self.skelcomp
+ receives a length, and returns the coresponding point and tangent of self.skelcomp
if follow is set to false, returns only the translation
'''
i,t=self.lengthtotime(s)