summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2009-06-09 22:18:39 +0000
committeralvinpenner <alvinpenner@users.sourceforge.net>2009-06-09 22:18:39 +0000
commitd489ea5ffb3d77cc128b46d4f5aef8c41ef5a758 (patch)
tree28c39d87a0335a08db2fa181b43294ef485427c4
parentContextuals splits to differentiate nodes as XML elements from nodes as parts... (diff)
downloadinkscape-d489ea5ffb3d77cc128b46d4f5aef8c41ef5a758.tar.gz
inkscape-d489ea5ffb3d77cc128b46d4f5aef8c41ef5a758.zip
implement patch by JazzyNico for LP bug 348611
(bzr r8034)
-rw-r--r--share/extensions/measure.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/share/extensions/measure.py b/share/extensions/measure.py
index 61c3f9611..453773649 100644
--- a/share/extensions/measure.py
+++ b/share/extensions/measure.py
@@ -126,21 +126,21 @@ class Length(inkex.Effect):
slengths, stotal = csplength(p)
''' Wio: Umrechnung in unit '''
if self.options.unit=="mm":
- factor=0.2822219 # px->mm
+ factor=25.4/90.0 # px->mm
elif self.options.unit=="pt":
- factor=0.80 # px->pt
+ factor=0.80 # px->pt
elif self.options.unit=="cm":
- factor=0.02822219 # px->cm
+ factor=25.4/900.0 # px->cm
elif self.options.unit=="m":
- factor=0.0002822219 # px->m
+ factor=25.4/90000.0 # px->m
elif self.options.unit=="km":
- factor=0.0000002822219 # px->km
+ factor=25.4/90000000.0 # px->km
elif self.options.unit=="in":
- factor=0.2822219/25.4 # px->in
+ factor=1.0/90.0 # px->in
elif self.options.unit=="ft":
- factor=0.2822219/(25.4*12) # px->ft
+ factor=1.0/90.0/12.0 # px->ft
elif self.options.unit=="yd":
- factor=0.2822219/(25.4*36) # px->yd
+ factor=1.0/90.0/36.0 # px->yd
else :
''' Default unit is px'''
factor=1