From: buliabyak Date: Wed, 21 Feb 2007 04:52:54 +0000 (+0000) Subject: fix 1662589: increase blur margins so that the cutoff is not noticeable (now at 2... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=460f0ebc13dac8431da5facea73dc9f9e3a41945;p=inkscape.git fix 1662589: increase blur margins so that the cutoff is not noticeable (now at 2.4*radius, it is at 3e-3; previously at 2*radius it was 1.8e-2 and quite visible) --- diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index b5c6bdc69..1a26b10ce 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -43,11 +43,13 @@ new_filter_gaussian_blur (SPDocument *document, gdouble radius, double expansion double rx = radius * (expansionY != 0? (expansion / expansionY) : 1); double ry = radius * (expansionX != 0? (expansion / expansionX) : 1); - if (width != 0 && height != 0 && (2 * rx > width * 0.1 || 2 * ry > height * 0.1)) { + if (width != 0 && height != 0 && (2.4 * rx > width * 0.1 || 2.4 * ry > height * 0.1)) { // If not within the default 10% margin (see // http://www.w3.org/TR/SVG11/filters.html#FilterEffectsRegion), specify margins - double xmargin = 2 * (rx) / width; - double ymargin = 2 * (ry) / height; + // The 2.4 is an empirical coefficient: at that distance the cutoff is practically invisible + // (the opacity at 2.4*radius is about 3e-3) + double xmargin = 2.4 * (rx) / width; + double ymargin = 2.4 * (ry) / height; // TODO: set it in UserSpaceOnUse instead? sp_repr_set_svg_double(repr, "x", -xmargin);