29 Nov
2003
29 Nov
'03
11:52 p.m.
Robert Crosbie wrote:
I like my svg to be really clean and I always hand tweak my drawings to make sure all objects are where I want them to be. One think i dont like is when doubles are printed like this:
x="200.000000" y="200.000000"
Is there are reason why we store more precision than necessary here? This value comes from sp_repr_set_double which uses sp_xml_dtoa. Doesn't sp_xml_dtoa do the same thing as printf %f formatting?
I have found that if I call sp_repr_set_double_attribute and replace the "%f" with a "%g" It will give a much cleaner output:
x="200" y="200"
Is there a technical reason why we have a custom dtoa function and keep the extra 0's?
Is this to hack around the locale bug with ',' and '.' having swapped meanings in different languages/countries?
njh