lpe-spiro.cpp revision 1071e61e46ddf04389109cf2ef25618e6e0dae4c
5f9cae5c825d76bdc95b78301e460a46ec5fbdf4Ryan Grove * Released under GNU GPL, read the file 'COPYING' for more information
5f9cae5c825d76bdc95b78301e460a46ec5fbdf4Ryan Grove// For handling un-continuous paths:
5f9cae5c825d76bdc95b78301e460a46ec5fbdf4Ryan Grovetypedef struct {
5f9cae5c825d76bdc95b78301e460a46ec5fbdf4Ryan Grovevoid bezctx_ink_moveto(bezctx *bc, double x, double y, int /*is_open*/)
5f9cae5c825d76bdc95b78301e460a46ec5fbdf4Ryan Grovevoid bezctx_ink_lineto(bezctx *bc, double x, double y)
5f9cae5c825d76bdc95b78301e460a46ec5fbdf4Ryan Grovevoid bezctx_ink_quadto(bezctx *bc, double xm, double ym, double x3, double y3)
bezctx *
namespace Inkscape {
namespace LivePathEffect {
using Geom::X;
using Geom::Y;
int ip = 0;
for(Geom::PathVector::const_iterator path_it = original_pathv.begin(); path_it != original_pathv.end(); ++path_it) {
ip++;
Geom::Path::const_iterator curve_endit = path_it->end_default(); // this determines when the loop has to stop
// if the path is closed, maybe we have to stop a bit earlier because the closing line segment has zerolength.
// TODO: see if this can be simplified by using /helpers/geom-nodetype.cpp:get_nodetype
++curve_it1;
++curve_it2;
ip++;
// curve_it1 points to the (visually) closing segment. determine the match between first and this last segment (the closing node)
switch (nodetype) {
ip++;
ip++;
free(s);
ip = 0;
// The continuity error always happens after a lot of curveto calls (a big path probably that spins to infinity?)
curve->get_pathvector() * Geom::identity(); // tests for continuity, this makes LPE Spiro slower of course :-(