On 27-Aug-2013 14:20, Johan Engelen wrote:
I think we should be able to change this code to
p0 = Inkscape::convert_unit(p0,"px", "in");
Or use a method instead of a function? The old way where conversions were done by multiplying by PX_PER_IN and friends was C like, the one above is about half way between C and C++. Wouldn't all the way to an object oriented programming style be: p0 = p0.in2px(); and p0 = p0.px2in(); That style would be fine by me - it is perfectly clear what they do. Sure, you would need a pair of conversion methods for each new unit to px, but only into and out of px, not between all possible combination of units. Ie: p0 = po.in2px().px2cm(); Regards, David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech