summaryrefslogtreecommitdiffstats
path: root/src/filter-chemistry.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2013-09-18 19:16:05 +0000
committerMartin Owens <doctormo@gmail.com>2013-09-18 19:16:05 +0000
commit5101aec2f8093348634b8f636c3aa8bf4a622eb7 (patch)
tree67736e7dbf1849d05cb270fbe138519d4f526525 /src/filter-chemistry.cpp
parentMerge in David Mathog (mathog) patch for bug #1224486 (diff)
downloadinkscape-5101aec2f8093348634b8f636c3aa8bf4a622eb7.tar.gz
inkscape-5101aec2f8093348634b8f636c3aa8bf4a622eb7.zip
Merge in patch for Jabiertxo Arraiza Cenoz in bug lp:1127103
Fixed bugs: - https://launchpad.net/bugs/1127103 (bzr r12530)
Diffstat (limited to 'src/filter-chemistry.cpp')
-rw-r--r--src/filter-chemistry.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp
index be030e12f..0f9138560 100644
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
@@ -208,6 +208,15 @@ new_filter_gaussian_blur (SPDocument *document, gdouble radius, double expansion
set_filter_area(repr, radius, expansion, expansionX, expansionY,
width, height);
+ /* Inkscape now supports both sRGB and linear color-interpolation-filters.
+ * But, for the moment, keep sRGB as default value for new filters.
+ * historically set to sRGB and doesn't require conversion between
+ * filter cairo surfaces and other types of cairo surfaces. lp:1127103 */
+ SPCSSAttr *css = sp_repr_css_attr_new();
+ sp_repr_css_set_property(css, "color-interpolation-filters", "sRGB");
+ sp_repr_css_change(repr, css, "style");
+ sp_repr_css_attr_unref(css);
+
//create feGaussianBlur node
Inkscape::XML::Node *b_repr;
b_repr = xml_doc->createElement("svg:feGaussianBlur");
@@ -260,6 +269,15 @@ new_filter_blend_gaussian_blur (SPDocument *document, const char *blendmode, gdo
repr = xml_doc->createElement("svg:filter");
repr->setAttribute("inkscape:collect", "always");
+ /* Inkscape now supports both sRGB and linear color-interpolation-filters.
+ * But, for the moment, keep sRGB as default value for new filters.
+ * historically set to sRGB and doesn't require conversion between
+ * filter cairo surfaces and other types of cairo surfaces. lp:1127103 */
+ SPCSSAttr *css = sp_repr_css_attr_new();
+ sp_repr_css_set_property(css, "color-interpolation-filters", "sRGB");
+ sp_repr_css_change(repr, css, "style");
+ sp_repr_css_attr_unref(css);
+
// Append the new filter node to defs
defs->appendChild(repr);
Inkscape::GC::release(repr);