lpe-dynastroke.cpp revision 6cbca725e54e2a92c160852776cd4d10ef7133fc
/** \file
* LPE <dynastroke> implementation
*/
/*
* Authors:
* JF Barraud
*
* Copyright (C) JF Barraud 2007 <jf.barraud@gmail.com>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-dynastroke.h"
//# include <libnr/n-art-bpath.h>
namespace Inkscape {
namespace LivePathEffect {
//----------------------------------------------------------
//--- TODO: Test this and move to 2Geom --------------------
//----------------------------------------------------------
static
using namespace Geom;
for (unsigned i=0; i<m.size()-1; i++){
}
}
return output;
}
//----------------------------------------------------------
//----------------------------------------------------------
//----------------------------------------------------------
//TODO: define more styles like in calligtool.
//TODO: allow fancy ends.
};
static const Util::EnumDataConverter<DynastrokeMethod> DSMethodConverter(DynastrokeMethodData, DSM_END);
};
static const Util::EnumDataConverter<DynastrokeCappingType> DSCTConverter(DynastrokeCappingTypeData, DSCT_END);
// initialise your parameters here:
method(_("Method:"), _("Choose pen type"), "method", DSMethodConverter, &wr, this, DSM_THICKTHIN_FAST),
angle(_("Angle:"), _("direction of thickest strokes (opposite = thinest)"), "angle", &wr, this, 45),
// modulo_pi(_("modulo pi"), _("Give forward and backward moves in one direction the same thickness "), "modulo_pi", &wr, this, false),
start_cap(_("Start:"), _("Choose start capping type"), "start_cap", DSCTConverter, &wr, this, DSCT_SHARP),
capping(_("Capping:"), _("left capping"), "capping", &wr, this, "M 100,5 C 50,5 0,0 0,0 0,0 50,-5 100,-5")
{
//registerParameter( dynamic_cast<Parameter *>(& modulo_pi) );
show_orig_path = true;
}
{
}
{
using namespace Geom;
n = rot90(n);
// for (unsigned i=0; i<n.size(); i++){
// std::cout<<n[i][X]<<"\n";
// }
// return m + unitVector(v);
#if 0
//TODO test if mag is non empty...
return output;
#else
if (roundness==1.) {
}else{
switch(stroke_method) {
case DSM_ELLIPTIC_PEN:{
//FIXME: roundness=0???
break;
}
case DSM_THICKTHIN_FAST:{
n1 = w*n;
break;
}
case DSM_THICKTHIN_SLOW:{
//->Slower and less stable, but more accurate .
//FIXME: is force continuity usefull? compatible with corners?
break;
}
default:{
break;
}
}//case
//
//TODO: insert relevant stitch at each corner!!
//
// if closed:
} else {
//if not closed, shape the ends:
//TODO: allow fancy ends...
//scale factor for a sharp start
if (grow_length < totlength){
}
//scale factor for a sharp end
if (fade_length < totlength){
}else{
}
}
}
}
//-----------
return output;
#endif
}
/* ######################## */
} //namespace LivePathEffect (setq default-directory "c:/Documents And Settings/jf/Mes Documents/InkscapeSVN")
} /* 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 :