[Libreoffice-commits] dev-tools.git: scripts/tpconv.py
Miklos Vajna
vmiklos at collabora.co.uk
Fri Mar 6 06:01:07 PST 2015
scripts/tpconv.py | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit f7f1a8847326bfa5d12feaa9bc6c82ff3d2acd98
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 6 15:00:36 2015 +0100
tpconv: allow pixel to logic conversion
Change-Id: I0e0448fc9efa4dc53e1dfd8e1b65ba68c56f36f3
diff --git a/scripts/tpconv.py b/scripts/tpconv.py
index a9e7bd1..8215349 100755
--- a/scripts/tpconv.py
+++ b/scripts/tpconv.py
@@ -28,6 +28,10 @@ conv = {
'emu': 1, # EMU / EMU
}
+# We know that VirtualDevices use a DPI of 96.
+# Could use 'gtk.gdk.screen_get_default().get_resolution()' from pygtk.
+conv['pixel'] = conv['inch'] / 96;
+
def convert(amount, fro, to):
# convert to EMU
emu = amount * conv[re.sub("s$", "", fro)]
More information about the Libreoffice-commits
mailing list