Re: [boost] GUI coordinate units (Was: GUI foundations)

In-Reply-To: <di0kc7$6th$1@sea.gmane.org> joel@boost-consulting.com (Joel de Guzman) wrote (abridged):
IMO, we should choose one representation and one unit. In my mind, that would be float and millimeter (in addition to percentages).
Why float rather than double? Generally picking float is an optimisation, and often a premature one. Sooner or later I think you will need the extra precision of double, and then you'll have an unnecessary conversion - possibly two, if the native device uses ints. Double => float => int. Why millimeter rather than inch or point? For text, there is a strong argument for using imperial rather than metric units. A point is 1/72th of an inch, so it converts nicely. Points don't convert so well to millimeters. Also, PDF and Postscript are points-oriented. I wouldn't buck the trend without a good reason. -- Dave Harris, Nottingham, UK.

Dave Harris wrote:
Why millimeter rather than inch or point? For text, there is a strong argument for using imperial rather than metric units. A point is 1/72th of an inch, so it converts nicely. Points don't convert so well to millimeters. Also, PDF and Postscript are points-oriented. I wouldn't buck the trend without a good reason.
huh, I disagree. Let's get rid of those imperial units once and for all ! /me hides ;-) Regards, Stefan

Stefan Seefeld wrote:
Dave Harris wrote:
Why millimeter rather than inch or point? For text, there is a strong argument for using imperial rather than metric units. A point is 1/72th of an inch, so it converts nicely. Points don't convert so well to millimeters.
A point is simply 0.35277777777777777777777777777778 millimeters :-) Seriously, look at it the other way... most docs and layouts that need accurate layouts (e.g CAD drawings) are in metric. Docs that rely on typography using points do not need that accuracy. There's no problem if a font is off by a few microns. This leads to the conclusion that the very reason that "points don't convert so well to millimeters" is actually a reason why choosing points as a standard unit is not good. Also, PDF and Postscript are points-oriented. I wouldn't buck
the trend without a good reason.
huh, I disagree. Let's get rid of those imperial units once and for all !
/me hides
I agree that I disagree ;-) Cheers, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
participants (3)
-
brangdon@cix.compulink.co.uk
-
Joel de Guzman
-
Stefan Seefeld