summaryrefslogtreecommitdiffstats
path: root/src/filter-chemistry.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2011-08-29 13:44:13 +0000
committertavmjong-free <tavmjong@free.fr>2011-08-29 13:44:13 +0000
commit5489ec55d35af6640606ad16b73930d505958faf (patch)
tree600eaca700b351b157804bcc1e2e63af943223f3 /src/filter-chemistry.cpp
parentFix compilation on Windows after libnr removal (diff)
downloadinkscape-5489ec55d35af6640606ad16b73930d505958faf.tar.gz
inkscape-5489ec55d35af6640606ad16b73930d505958faf.zip
Add minimal support for reading color-interpolation and color-interpolation-filters
properties (however, Inkscape assumes sRGB everywhere at the moment). Change color-interpolation-filters from attribute to style property in sp-filter.cpp as it is not allowed as an attribute in a <filter> (it is only allowed as an attribute in filter primitives). Added color-interpolation-filters:sRGB to style when new filter is created in filter-chemistry.cpp. (bzr r10591)
Diffstat (limited to 'src/filter-chemistry.cpp')
-rw-r--r--src/filter-chemistry.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp
index 1b63bf6f9..b8c4cf901 100644
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
@@ -97,6 +97,12 @@ SPFilter *new_filter(SPDocument *document)
Inkscape::XML::Node *repr;
repr = xml_doc->createElement("svg:filter");
+ // Inkscape only supports sRGB. See note in sp-filter.cpp.
+ 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);