28 Aug
2013
28 Aug
'13
4:46 p.m.
On 28-8-2013 1:06, mathog wrote:
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();
No it wouldn't. C++ or OOP are not about adding methods or classes everywhere.
- Johan