summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
authorJasper van de Gronde <jasper.vandegronde@gmail.com>2009-04-23 12:25:56 +0000
committerjaspervdg <jaspervdg@users.sourceforge.net>2009-04-23 12:25:56 +0000
commit941c6ff8cab0295581ec9d99036d4c56cf1e9d06 (patch)
tree49fe94ba5498333b97e632f98344981bc9391b11 /src/sp-filter.cpp
parentfix for [Bug 365197] Make install doesn't install dxf_input.py (diff)
downloadinkscape-941c6ff8cab0295581ec9d99036d4c56cf1e9d06.tar.gz
inkscape-941c6ff8cab0295581ec9d99036d4c56cf1e9d06.zip
Evil work-around for Inkscape's lack of support for color-interpolation-filters (and color-interpolation).
(bzr r7762)
Diffstat (limited to 'src/sp-filter.cpp')
-rw-r--r--src/sp-filter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 2a971ccc6..db27e1826 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -349,6 +349,15 @@ sp_filter_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::N
g_free(uri_string);
}
+ // TODO: This is evil, correctly implement support for color-interpolation-filters!!!
+ // The color-interpolation-filters attribute is initially set to linearRGB according to the SVG standard.
+ // However, Inkscape completely ignores it and implicitly assumes that it is sRGB (like color-interpolation-filters).
+ // This results in a discrepancy between Inkscape and other renderers in how they render filters.
+ // To mitigate this problem I've (Jasper van de Gronde,th.v.d.gronde@hccnet.nl) added this to ensure that at least
+ // any filters written by Inkscape will henceforth be rendered the same in other renderers.
+ // In the future Inkscape should have proper support for the color-interpolation properties and this should be changed.
+ repr->setAttribute("color-interpolation-filters", "sRGB");
+
if (((SPObjectClass *) filter_parent_class)->write) {
((SPObjectClass *) filter_parent_class)->write(object, doc, repr, flags);
}