- From: H&kon W Lie <howcome@w3.org>
- Date: Mon, 15 May 1995 00:52:34 --100
- To: wmperry@spry.com
- Cc: www-style@w3.org
Bill, > Do you have a handy conversion chart for the various 'spatial' > coordinates that we use in the style sheet proposal? 1 in = 25.4 mm = 72 pt = 6 pa The naming of these will become an issue -- the less significant the more discussions.. I enclose some code to do the pt to px conversion (which is the only one I support so far). The source code of xdpyinfo.c has an explanations of the issues. double display_pt2px; #ifdef X11 display_pt2px = (25.4 / 72.0) * (((double) DisplayWidth(display,screen)) / ((double) DisplayWidthMM(display, screen))); #endif int pt2px(double pt) { return (int) ((display_pt2px * pt) + 0.5); } -h&kon Hakon W Lie, WWW project CERN, CH-1211 Geneva 23 http://www.w3.org/hypertext/WWW/People/howcome/
Received on Monday, 23 January 2023 01:05:08 UTC