Re: [Gimp-developer] Defaults for sel2path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Neary wrote:
> So here goes... could people comment on whether they think these
> are pretty crap, or whether people reckon these might be better
> as defaults? Cheers. By the way, for those that don't know, to
> bring up the menu, Shift-Click on the selection-to-path button in
> the paths dialog while there's a selection active.

As requested, here's a patch against 1.3 (same patch works
unchanged against 1.2) for people to try.

Cheers,
Dave.

-- 
       David Neary,
    Marseille, France
  E-Mail: bolsh@xxxxxxxx
Index: plug-ins/sel2path/fit.c
===================================================================
RCS file: /cvs/gnome/gimp/plug-ins/sel2path/fit.c,v
retrieving revision 1.6
diff -u -r1.6 fit.c
--- plug-ins/sel2path/fit.c	22 May 2000 17:10:23 -0000	1.6
+++ plug-ins/sel2path/fit.c	22 Oct 2002 14:17:47 -0000
@@ -34,7 +34,7 @@
 
 /* If two endpoints are closer than this, they are made to be equal.
    (-align-threshold)  */ 
-real align_threshold = 0.5;
+real align_threshold = 1.0;
 
 /* If the angle defined by a point and its predecessors and successors
    is smaller than this, it's a corner, even if it's within
@@ -55,7 +55,7 @@
    pixel is further away than this from the fitted curve, we try again.
    (-error-threshold) */
 /* real error_threshold = .8; ALT */
-real error_threshold = .4;
+real error_threshold = 1.0;
 
 /* A second number of adjacent points to consider when filtering.
    (-filter-alternative-surround)  */
@@ -71,7 +71,7 @@
    results.  But if any points that ``should'' be corners aren't found,
    the curve goes to hell around that point.  (-filter-iterations)  */
 /* unsigned filter_iteration_count = 4; ALT */
-unsigned filter_iteration_count = 4;
+unsigned filter_iteration_count = 10;
 
 /* To produce the new point, use the old point plus this times the
    neighbors.  (-filter-percent)  */
@@ -79,11 +79,11 @@
 
 /* Number of adjacent points to consider if `filter_surround' points
    defines a straight line.  (-filter-secondary-surround)  */
-unsigned filter_secondary_surround = 3;
+unsigned filter_secondary_surround = 5;
 
 /* Number of adjacent points to consider when filtering.
   (-filter-surround)  */
-unsigned filter_surround = 2;
+unsigned filter_surround = 3;
 
 /* Says whether or not to remove ``knee'' points after finding the outline. 
    (See the comments at `remove_knee_points'.)  (-remove-knees).  */
@@ -93,7 +93,7 @@
    straight line, even if it would otherwise be changed back to a curve.
    This is weighted by the square of the curve length, to make shorter
    curves more likely to be reverted.  (-line-reversion-threshold)  */
-real line_reversion_threshold = .01;
+real line_reversion_threshold = .1;
 
 /* How many pixels (on the average) a spline can diverge from the line
    determined by its endpoints before it is changed to a straight line.
@@ -104,7 +104,7 @@
 /* If reparameterization doesn't improve the fit by this much percent,
    stop doing it.  (-reparameterize-improve)  */
 /* real reparameterize_improvement = .10; ALT */
-real reparameterize_improvement = .01;
+real reparameterize_improvement = .10;
 
 /* Amount of error at which it is pointless to reparameterize.  This
    happens, for example, when we are trying to fit the outline of the
@@ -117,19 +117,19 @@
 
 /* Percentage of the curve away from the worst point to look for a
    better place to subdivide.  (-subdivide-search)  */
-real subdivide_search = .1;
+real subdivide_search = .25;
 
 /* Number of points to consider when deciding whether a given point is a
    better place to subdivide.  (-subdivide-surround)  */
-unsigned subdivide_surround = 4;
+unsigned subdivide_surround = 6;
 
 /* How many pixels a point can diverge from a straight line and still be
    considered a better place to subdivide.  (-subdivide-threshold) */
-real subdivide_threshold = .03;
+real subdivide_threshold = .5;
 
 /* Number of points to look at on either side of a point when computing
    the approximation to the tangent at that point.  (-tangent-surround)  */
-unsigned tangent_surround = 3;
+unsigned tangent_surround = 4;
 
 
 /* We need to manipulate lists of array indices.  */

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux