/* * Here be the doEffect function chain: */ void Effect::doEffect (SPCurve * curve) { NArtBpath *new_bpath = doEffect(SP_CURVE_BPATH(curve)); if (new_bpath) { // FIXME, add function to SPCurve to change bpath? or a copy function? if (curve->_bpath) { g_free(curve->_bpath); //delete old bpath } curve->_bpath = new_bpath; } } NArtBpath * Effect::doEffect (NArtBpath * path_in) { std::vector orig_pathv = BPath_to_2GeomPath(path_in); std::vector result_pathv = doEffect(orig_pathv); NArtBpath *new_bpath = BPath_from_2GeomPath(result_pathv); return new_bpath; } std::vector Effect::doEffect (std::vector & path_in) { Geom::Piecewise > pwd2_in; // FIXME: find standard function to convert std::vector ==> Piecewise< D2 > for (unsigned int i=0; i < path_in.size(); i++) { pwd2_in.concat( path_in[i].toPwSb() ); } Geom::Piecewise > pwd2_out = doEffect(pwd2_in); std::vector path_out = Geom::path_from_piecewise( pwd2_out, LPE_CONVERSION_TOLERANCE); return path_out; } Geom::Piecewise > Effect::doEffect (Geom::Piecewise > & pwd2_in) { g_warning("Effect has no doEffect implementation"); return pwd2_in; }