summaryrefslogtreecommitdiff
path: root/src/gdhelpers.h
diff options
context:
space:
mode:
authortabe <none@none>2009-03-08 09:16:04 +0000
committertabe <none@none>2009-03-08 09:16:04 +0000
commitf40454c1b307c92e5c111671c0f12a7ae26eecb8 (patch)
treeac64628926500e4d6c67e660db1f9cced4bf67d2 /src/gdhelpers.h
parent02ae7c20079a64e8c809108deb1a0d50d816c9dd (diff)
downloadlibgd-f40454c1b307c92e5c111671c0f12a7ae26eecb8.tar.gz
ref FS#176: added support of variable resolution by Alan Boudreault.
Diffstat (limited to 'src/gdhelpers.h')
-rw-r--r--src/gdhelpers.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gdhelpers.h b/src/gdhelpers.h
index a333c4c..e946903 100644
--- a/src/gdhelpers.h
+++ b/src/gdhelpers.h
@@ -58,6 +58,11 @@ int overflow2(int a, int b);
#endif /* HAVE_PTHREAD */
#endif /* WIN32 */
+#define DPCM2DPI(dpcm) (unsigned int)((dpcm)*2.54 + 0.5)
+#define DPM2DPI(dpm) (unsigned int)((dpm)*0.0254 + 0.5)
+#define DPI2DPCM(dpi) (unsigned int)((dpi)/2.54 + 0.5)
+#define DPI2DPM(dpi) (unsigned int)((dpi)/0.0254 + 0.5)
+
#endif /* GDHELPERS_H */
#ifdef __cplusplus