From: Alexandre F. <ale...@gm...> - 2008-11-05 22:33:34
|
Hi, In the absence of reaction to my question "Why millimeters", I have spent several minutes in apnea in tkObj.c et al. Now I am really perplex. I have the impression that: - pixelObjType is the primary multi-unit storage type. It holds a double internal value, and an integer "returnValue". - mmObjType is a secondary type with roughly the same properties, the only differences being the interpretation (scale) of the double value *and* the fact that the returnValue is double too. - in tkObj.c the code comments are completely confusing because they are visibly copied/pasted from the pixelObjType, and frequently misuse the word "pixel" where "mm" is meant. - I cannot seem to find a documentation page giving the contracts nor even rationale for these types. Something like "the unit is sticky" or "no loss of precision while staying iso-unit", or the like... Can you help me there ? I have the vague impression that the initial problem in tkCanvUtil.c (useless roundtrip to mm for [coords]) would be trivially avoided by using the pixel type (especially the GetDoublePixels variant, which does not go through the integer bottleneck) and not the MM type. But the problem is that this would completely void the usefulness of the MM type (the other use is in text tabs; similar migration could be done harmlessly I guess)... What am I missing ? Thanks in advance, -Alex |