Code

move tolerance range towards roughness
authorbuliabyak <buliabyak@users.sourceforge.net>
Wed, 9 Jul 2008 07:03:41 +0000 (07:03 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Wed, 9 Jul 2008 07:03:41 +0000 (07:03 +0000)
src/pencil-context.cpp

index e4c79bfdcf0dfc5bf3e65963210af4c5b42cb56b..20d1c113da83d67a5540b7223c09e5ff5bfa1033 100644 (file)
@@ -626,9 +626,9 @@ fit_and_split(SPPencilContext *pc)
 {
     g_assert( pc->npoints > 1 );
 
-    double const tolerance_sq = square( NR::expansion(pc->desktop->w2d())
+    double const tolerance_sq = 0.02 * square( NR::expansion(pc->desktop->w2d())
                                         * prefs_get_double_attribute_limited("tools.freehand.pencil",
-                                                                             "tolerance", 10.0, 1.0, 100.0) );
+                                                                   "tolerance", 10.0, 1.0, 100.0) );
 
     NR::Point b[4];
     g_assert(is_zero(pc->req_tangent)