diff options
author | tabe <none@none> | 2009-03-08 09:16:04 +0000 |
---|---|---|
committer | tabe <none@none> | 2009-03-08 09:16:04 +0000 |
commit | f40454c1b307c92e5c111671c0f12a7ae26eecb8 (patch) | |
tree | ac64628926500e4d6c67e660db1f9cced4bf67d2 /src/gdhelpers.h | |
parent | 02ae7c20079a64e8c809108deb1a0d50d816c9dd (diff) | |
download | libgd-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.h | 5 |
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 |