summaryrefslogtreecommitdiffstats
path: root/src/filter-chemistry.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-02-21 04:52:54 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-02-21 04:52:54 +0000
commit278c354ad397af4ae422f6040cdef545c9b3fcfb (patch)
treed14bf3789db34afe1b4bed02d2a261b22eb9b24c /src/filter-chemistry.cpp
parentCrudely improve check-markup for &#123; markup, fix translations with bugs in... (diff)
downloadinkscape-278c354ad397af4ae422f6040cdef545c9b3fcfb.tar.gz
inkscape-278c354ad397af4ae422f6040cdef545c9b3fcfb.zip
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)
(bzr r2411)
Diffstat (limited to 'src/filter-chemistry.cpp')
-rw-r--r--src/filter-chemistry.cpp8
1 files changed, 5 insertions, 3 deletions
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);