From 48e5d628a8f49b0ff7e6db3d91b3b91f4a1af91a Mon Sep 17 00:00:00 2001 From: Scott Dutton Date: Thu, 22 Feb 2018 18:21:52 +0000 Subject: Add support for pt and pc (#87) * Add support for pt and pc * Misc fixes --- inkstitch.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'inkstitch.py') 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 -- cgit v1.2.3