summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2011-08-30 20:16:57 +0000
committerJazzyNico <nicoduf@yahoo.fr>2011-08-30 20:16:57 +0000
commit373a83fb24eaa873d37093210db7d06da7cb61f5 (patch)
tree49880709fba8ba14a7a046e9b3fae4b844cce44a /src
parenti18n. Fix for bug #745285 (bad English translations in inkscape). (diff)
downloadinkscape-373a83fb24eaa873d37093210db7d06da7cb61f5.tar.gz
inkscape-373a83fb24eaa873d37093210db7d06da7cb61f5.zip
Filters. Workaround for bug #808013 (Drop Shadow; 0.0 for blur doesn't work).
(bzr r10602)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/filter/shadows.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/extension/internal/filter/shadows.h b/src/extension/internal/filter/shadows.h
index b816a3e10..6a7cf38f2 100644
--- a/src/extension/internal/filter/shadows.h
+++ b/src/extension/internal/filter/shadows.h
@@ -107,7 +107,13 @@ ColorizableDropShadow::get_filter_text (Inkscape::Extension::Extension * ext)
const gchar *type = ext->get_param_enum("type");
guint32 color = ext->get_param_color("color");
- blur << ext->get_param_float("blur");
+
+ if (ext->get_param_float("blur") > 0) {
+ blur << "<feGaussianBlur in=\"composite1\" stdDeviation=\"" << ext->get_param_float("blur") << "\" result=\"blur\" />\n";
+ } else {
+ blur << "";
+ }
+
x << ext->get_param_float("xoffset");
y << ext->get_param_float("yoffset");
a << (color & 0xff) / 255.0F;
@@ -161,7 +167,7 @@ ColorizableDropShadow::get_filter_text (Inkscape::Extension::Extension * ext)
"<filter xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" style=\"color-interpolation-filters:sRGB;\" inkscape:label=\"Drop Shadow\">\n"
"<feFlood flood-opacity=\"%s\" flood-color=\"rgb(%s,%s,%s)\" result=\"flood\" />\n"
"<feComposite in=\"%s\" in2=\"%s\" operator=\"%s\" result=\"composite1\" />\n"
- "<feGaussianBlur in=\"composite1\" stdDeviation=\"%s\" result=\"blur\" />\n"
+ "%s"
"<feOffset dx=\"%s\" dy=\"%s\" result=\"offset\" />\n"
"<feComposite in=\"%s\" in2=\"%s\" operator=\"%s\" result=\"composite2\" />\n"
"</filter>\n", a.str().c_str(), r.str().c_str(), g.str().c_str(), b.str().c_str(),