From: Johan E. <jbc...@sw...> - 2012-04-10 19:18:53
|
Hi guys, As a result from my changing the definition of isZero (a==0 to are_near) on Linear, a bug popped up in Inkscape: http://pastie.org/pastes/3763503/text?key=mj3yosx9rrc2xkqgzkow I fixed the issue in Inkscape rev 11212: http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11212 Please review and confirm that the fix is correct. I am in doubt whether at the end of the for-loop, Pk.truncate(order); Qk.truncate(order); r.truncate(order); should be followed by Pk.resize(order,Linear(0.)); Qk.resize(order,Linear(0.)); r.resize(order,Linear(0.)); Just to be absolutely sure they have the correct size. The bug happened because for some paths, a whole bunch of things were zero, causing 'sg' to be zero with zero order. After this fix, we hit upon another exception, ... lib2geom exception: Invariants violation (src/2geom/piecewise.h:144) Note, everthing works fine when changing Linear:: inline bool isZero(double eps=EPSILON) const { return are_near(a[0], 0., eps) && are_near(a[1], 0., eps); } to a[0]==0 && a[1]==0 Thanks, Johan |