summaryrefslogtreecommitdiff
path: root/inkstitch.py
diff options
context:
space:
mode:
authorScott Dutton <exussum12@users.noreply.github.com>2018-02-22 18:21:52 +0000
committerLex Neva <lexelby@users.noreply.github.com>2018-02-22 13:21:52 -0500
commit48e5d628a8f49b0ff7e6db3d91b3b91f4a1af91a (patch)
tree7317f315453059c9555a24d68a1da7559b8922b4 /inkstitch.py
parent2f91fba52ac71bf1f50c350daf541e186d7ca3ce (diff)
Add support for pt and pc (#87)
* Add support for pt and pc * Misc fixes
Diffstat (limited to 'inkstitch.py')
-rw-r--r--inkstitch.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/inkstitch.py b/inkstitch.py
index 6db9d003..8a87b160 100644
--- a/inkstitch.py
+++ b/inkstitch.py
@@ -102,9 +102,17 @@ def convert_length(length):
if not units or units == "px":
return value
+ if units == 'pt':
+ value /= 72
+ units = 'in'
+
+ if units == 'pc':
+ value /= 6
+ units = 'in'
+
if units == 'cm':
value *= 10
- units == 'mm'
+ units = 'mm'
if units == 'mm':
value = value / 25.4