summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2009-02-07 18:48:06 +0000
committeralvinpenner <alvinpenner@users.sourceforge.net>2009-02-07 18:48:06 +0000
commit63fe8b189056ccb7b0761057d6e6e1409c12778b (patch)
tree898bd42acffb5f053a53067a1c5e3dd65cfaa15e /share
parentadapt for new menu structure (diff)
downloadinkscape-63fe8b189056ccb7b0761057d6e6e1409c12778b.tar.gz
inkscape-63fe8b189056ccb7b0761057d6e6e1409c12778b.zip
scale the radius and sweep-flag in elliptical arc
(bzr r7246)
Diffstat (limited to 'share')
-rwxr-xr-xshare/extensions/simplepath.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/extensions/simplepath.py b/share/extensions/simplepath.py
index 8d50429a6..4cfedcac9 100755
--- a/share/extensions/simplepath.py
+++ b/share/extensions/simplepath.py
@@ -68,7 +68,7 @@ pathdefs = {
'S':['S', 4, [float, float, float, float], ['x','y','x','y']],
'Q':['Q', 4, [float, float, float, float], ['x','y','x','y']],
'T':['T', 2, [float, float], ['x','y']],
- 'A':['A', 7, [float, float, float, int, int, float, float], [0,0,0,0,0,'x','y']],
+ 'A':['A', 7, [float, float, float, int, int, float, float], ['r','r',0,0,'s','x','y']],
'Z':['L', 0, [], []]
}
def parsePath(d):
@@ -184,6 +184,11 @@ def scalePath(p, x, y):
params[i] *= x
elif defs[3][i] == 'y':
params[i] *= y
+ elif defs[3][i] == 'r': # radius parameter
+ params[i] *= x
+ elif defs[3][i] == 's': # sweep-flag parameter
+ if x*y < 0:
+ params[i] = 1 - params[i]
def rotatePath(p, a, cx = 0, cy = 0):
if a == 0: