Code

Applied patch 1707577 to add "ft" and "yd"
authorishmal <ishmal@users.sourceforge.net>
Fri, 11 May 2007 23:33:37 +0000 (23:33 +0000)
committerishmal <ishmal@users.sourceforge.net>
Fri, 11 May 2007 23:33:37 +0000 (23:33 +0000)
share/extensions/measure.inx
share/extensions/measure.py

index b04456a8bad03b5bc151c4200f52487fd251f8a2..350751463cf82dbd23300ede9b0a3f89c0b78799 100644 (file)
@@ -15,6 +15,8 @@
         <item value="px">px</item>
         <item value="pt">pt</item>
         <item value="in">in</item>
+        <item value="ft">ft</item>
+        <item value="yd">yd</item>
         <item value="mm">mm</item>
         <item value="cm">cm</item>
         <item value="m">m</item>
index d19dde93166e144ca2a6a8653c90d629f191b632..4a4435ceb105416856824a550a6a2fbd61e70c2a 100644 (file)
@@ -140,6 +140,10 @@ class Length(inkex.Effect):
                     factor=0.0000002822219 # px->km
                 elif self.options.unit=="in":
                     factor=0.2822219/25.4 # px->in
+                elif self.options.unit=="ft":
+                    factor=0.2822219/(25.4*12) # px->ft
+                elif self.options.unit=="yd":
+                    factor=0.2822219/(25.4*36) # px->yd
                 else :
                     ''' Default unit is px'''
                     factor=1