#define INKSCAPE_LPE_SPIRO_C
/*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-spiro.h"
#include <typeinfo>
#include "helper/geom-nodetype.h"
#include "helper/geom-curves.h"
#include "live_effects/spiro.h"
// For handling un-continuous paths:
#include "message-stack.h"
#include "inkscape.h"
#include "desktop.h"
namespace Inkscape {
namespace LivePathEffect {
{
}
{
}
void
{
}
using Geom::X;
using Geom::Y;
// Make copy of old path as it is changed during processing
int ip = 0;
for(Geom::PathVector::const_iterator path_it = original_pathv.begin(); path_it != original_pathv.end(); ++path_it) {
continue;
// start of path
{
ip++;
}
// midpoints
Geom::Path::const_iterator curve_endit = path_it->end_default(); // this determines when the loop has to stop
while ( curve_it2 != curve_endit )
{
/* This deals with the node between curve_it1 and curve_it2.
* Loop to end_default (so without last segment), loop ends when curve_it2 hits the end
* and then curve_it1 points to end or closing segment */
// Determine type of spiro node this is, determined by the tangents (angles) of the curves
// TODO: see if this can be simplified by using /helpers/geom-nodetype.cpp:get_nodetype
{
if (this_is_line && !next_is_line) {
} else if (next_is_line && !this_is_line) {
} else {
}
} else {
}
++curve_it1;
++curve_it2;
ip++;
}
// add last point to the spiropath
// curve_it1 points to the (visually) closing segment. determine the match between first and this last segment (the closing node)
switch (nodetype) {
ip++;
break;
break;
case Geom::NODE_SMOOTH:
break;
}
} else {
// set type to path closer
ip++;
}
// run subpath through spiro
ip = 0;
}
}
}; //namespace LivePathEffect
}; /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :