As anyone who uses Inkscape for real work knows, stroked shapes are
prone to becoming invisible at certain zooms. It's especially bad for
complex path, and playing with L-system effect recently made it so
annoying for me that I searched for a fix. Which turned out to be
quite trivial, so I committed it. This closes at least two bugs:
and a related bug where a complex path actually disappears (not just
becomes invisible) after an offset:
Of course this change (in livarot lib) is somewhat risky, but in my
testing it works well. Very complex paths that would previously simply
disappear, now may display certain small rendering artefacts
(horizontal lines), but i think it's much better than becoming totally
invisible. Please test thoroughly; if you see something bad,
especially crashes, I would back this out.
For those interested, the reason for this bug was given by Fred in this comment:
shape_euler_err = 4, // computations result in a non-eulerian
graph, thus the function cannot do a proper polygon
// despite the rounding sheme, this still happen with uber-complex graphs
// note that coordinates are stored in double => double precision
for the computation is not even
// enough to get exact results (need quadruple precision, i think).
So in most cases this error was caused by rounding errors, not by the
shape graph really being non-Eulerian (which means some nodes have
more in-coming edges than out-coming edges). So I simply removed the
check for Eulerianness for stroke shape. My understanding is that even
if we hit some shape which is not Eulerian, the renderer will simply
do some artefacts but should not crash.
Inkscape. Draw Freely.