I suspect it's something with your code.
indeed it is. the ConvertToShape() return 4, meaning it fucked up the uncrossing. the path you give him is a good example of polygons intersectors don't like: "long" edges with lots of intersections in a small area, and worst of all, small angles between segments. there is also another tiny star in the svg that isn't rendered properly for the same reasons. i'll take a look at the problem when i have some time, but you must realize that converting strokes to polygons just to raster them is not a clever method. dumbly rasterizing them segment by segment with a supersampled antialiasing is faster (well, ought to be faster) and much more robust to numerical problems. if you want to get rid of rasterization bugs, i'm afraid you'll have to get there one day.
Yes, I never could fully understand why an intersector is needed in a renderer at all. This is design we inherited from Sodipodi. Do you think it's realistic to change that? How hard could that be?
you add a check that would prevent it from doing any simplification on a subpath that contains only one node? That would stop it from growing indefinitely. I would do this myself but I only know
here is also a big algorithmical problem: the simplification algorithm (if you can call that an algorithm) is not even able to recompose a single cubic bezier curve from a polyline coming from a single bezier curve; it will produce several cubic curves, unless you give a very big treshhold, or refine the fitting a lot (and it takes time). the growth/rotate/oddities would probably not happen if the algorithm worked properly on a single cubic curve. before adding shortcuts to prevent degenerate cases, it's better (IMHO) to make the simplification behave correctly on such simple paths.
I don't know, but if part of what Simplify does is adding more nodes sometimes, I'd say it's OK. The design appeal of Simplify is in its "randomness" and "generalization". The number of nodes is of secondary importance. The goal is not a mathematically perfect simplification, but one that "feels right". The current algorithm is very good in this respect, imho.
_________________________________________________________________ Add photos to your messages with MSN Premium. Get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI...