
Bryce Harrington wrote:
// string ftos(double val[, char mode[, int sigfig[, int precision[, int options]]]])
I think this solution is the only one which might work. Always rounding to a fixed value inch doesn't work: Imagine, you have a small graph which is scaled up.
If we just round to a certain fraction of inches or millimeters, this graph will become a dot.
It'd be interesting to see how badly the rounding would affect things. I'd done some analysis to see how the rounding propagated (for an engineering program I was developing), and found that even small errors would tend to propagate pretty quickly, but if it's only used during document save, as it would be in Inkscape, then the impact may be minimal.
This is true but remember that the saved document will be loaded again, eventually. Many load/save cycles shouldn't deteriorate the image, either. And the setting must be something which the user (who has no idea what's going on) doesn't notice.
Otherwise, he'll save the image, open it the other day and scream.