diff options
| author | JF Barraud <jf.barraud@gmail.com> | 2008-03-02 18:22:01 +0000 |
|---|---|---|
| committer | jfbarraud <jfbarraud@users.sourceforge.net> | 2008-03-02 18:22:01 +0000 |
| commit | e67fdb492db1afca26311462e66aca169ca935b1 (patch) | |
| tree | 5327dc8c859fe52b8c99bfa5b602384e4675c038 /src | |
| parent | * [INTL: de, es] Merging updated translations from 0.46 branch (diff) | |
| download | inkscape-e67fdb492db1afca26311462e66aca169ca935b1.tar.gz inkscape-e67fdb492db1afca26311462e66aca169ca935b1.zip | |
stupid bug fix (crash upon big stroke length variation) + some parameters renamed
(bzr r4927)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-sketch.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/live_effects/lpe-sketch.cpp b/src/live_effects/lpe-sketch.cpp index d7333033a..87df68b8a 100644 --- a/src/live_effects/lpe-sketch.cpp +++ b/src/live_effects/lpe-sketch.cpp @@ -35,18 +35,28 @@ LPESketch::LPESketch(LivePathEffectObject *lpeobject) : // initialise your parameters here: //testpointA(_("Test Point A"), _("Test A"), "ptA", &wr, this, Geom::Point(100,100)), nbiter_approxstrokes(_("Nb of iterations"), _("Draw that many approximating strokes sequences."), "nbiter_approxstrokes", &wr, this, 5), - strokelength(_("Max stroke length"), _("Maximal length of approximated strokes."), "strokelength", &wr, this, 100.), - strokelength_rdm(_("Randomness"), _("Random variation of stroke length (relative to max. length)."), "strokelength_rdm", &wr, this, .3), - strokeoverlap(_("Max. overlap"), _("How much successive strokes should overlap (relative to max. length)."), "strokeoverlap", &wr, this, .3), - strokeoverlap_rdm(_("Randomness"), _("Random variation of overlap (relative to max. overlap)"), "strokeoverlap_rdm", &wr, this, .3), - ends_tolerance(_("Max. ends tolerance"), _("Max. distance between original and approximated paths ends (relative to max. length)."), "ends_tolerance", &wr, this, .1), - parallel_offset(_("Average offset"), _("Average distance to original stroke(try 0.)."), "parallel_offset", &wr, this, 5.), - tremble_size(_("Max. tremble"), _("Maximal tremble magnitude."), "tremble_size", &wr, this, 5.), - tremble_frequency(_("Tremble frequency"), _("Typical nb of tremble 'period' in a stroke."), "tremble_frequency", &wr, this, 1.), - nbtangents(_("Nb of construction Lines"), _("How many construction lines (tangents) to draw?"), "nbtangents", &wr, this, 5), - tgtscale(_("Scale"), _("Scale factor relating curvature and length of construction lines(try 5*avarage offset) )"), "tgtscale", &wr, this, 10.0), + strokelength(_("Max stroke length"), + _("Maximal length of approximated strokes."), "strokelength", &wr, this, 100.), + strokelength_rdm(_("Stroke length variation"), + _("Random variation of stroke length (relative to max. length)."), "strokelength_rdm", &wr, this, .3), + strokeoverlap(_("Max. overlap"), + _("How much successive strokes should overlap (relative to max. length)."), "strokeoverlap", &wr, this, .3), + strokeoverlap_rdm(_("Overlap variation"), + _("Random variation of overlap (relative to max. overlap)"), "strokeoverlap_rdm", &wr, this, .3), + ends_tolerance(_("Max. ends tolerance"), + _("Max. distance between original and approximated paths ends (relative to max. length)."), "ends_tolerance", &wr, this, .1), + parallel_offset(_("Parallel offset"), + _("Average distance to original stroke(try 0.)."), "parallel_offset", &wr, this, 5.), + tremble_size(_("Max. tremble"), + _("Maximal tremble magnitude."), "tremble_size", &wr, this, 5.), + tremble_frequency(_("Tremble frequency"), + _("Typical nb of tremble 'period' in a stroke."), "tremble_frequency", &wr, this, 1.), + nbtangents(_("Nb of construction Lines"), + _("How many construction lines (tangents) to draw?"), "nbtangents", &wr, this, 5), + tgtscale(_("Scale"), + _("Scale factor relating curvature and length of construction lines(try 5*avarage offset) )"), "tgtscale", &wr, this, 10.0), tgtlength(_("Max. length"), _("Max. length of construction lines."), "tgtlength", &wr, this, 100.0), - tgtlength_rdm(_("Randomness"), _("Random variation of construction lines length."), "tgtlength_rdm", &wr, this, .3) + tgtlength_rdm(_("Length variation"), _("Random variation of construction lines length."), "tgtlength_rdm", &wr, this, .3) { // register all your parameters here, so Inkscape knows which parameters this effect has: //Add some comment in the UI: *warning* the precise output of this effect might change in future releases! @@ -270,7 +280,7 @@ LPESketch::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in) //step points: s0 = s1 - overlap. //TODO: make sure this has to end? - s0 = s1 - strokeoverlap*(1-strokeoverlap_rdm)*strokelength; + s0 = s1 - strokeoverlap*(1-strokeoverlap_rdm)*(s1-s0); } } } |
