On 2010-10-11 23:51, Alvin Penner wrote:
I have been browsing the code to find usages of SVGEllipticalArc that may affect Bug 653315. So far the most interesting reference is in:
\src\display\inkscape-cairo.cpp, around line 136, routine 'feed_curve_to_cairo' ... what I am curious about is the tolerance value of 0.1 in the call to Geom::cubicbezierpath_from_sbasis.
Two questions:
- is this code responsible for rendering ellipses?
I doubt it (in general at least), as Inkscape only uses Cairo in outline mode(?) for now, until Krzysztof's branch is merged with trunk.)
- would it be worthwhile to try a lower tolerance?
Just try it. I'm not entirely sure what it will do though, as I would expect converting an SBasis curve to Bezier's to be exact as long as the SBasis curve has a low enough degree, but maybe it simple doesn't have a low enough degree?
(there are other instances of this usage, in the files geom.cpp, PathCutting.cpp, svg-path.cpp, but I hope the current one is most relevant.)
Note that more hidden uses can also occur (through the use of virtual function calls). I would recommend putting a printf (or std::cout) in the actual conversion function to see when it's being called. Or use a proper debugger (although I personally prefer the former to gdb).