From 5101aec2f8093348634b8f636c3aa8bf4a622eb7 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 18 Sep 2013 15:16:05 -0400 Subject: Merge in patch for Jabiertxo Arraiza Cenoz in bug lp:1127103 Fixed bugs: - https://launchpad.net/bugs/1127103 (bzr r12530) --- src/filter-chemistry.cpp | 18 ++++++++++++++++++ src/style.cpp | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src') 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); diff --git a/src/style.cpp b/src/style.cpp index db05a748f..e9cf22891 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -3170,7 +3170,10 @@ sp_style_clear(SPStyle *style) style->color_interpolation.value = style->color_interpolation.computed = SP_CSS_COLOR_INTERPOLATION_SRGB; style->color_interpolation_filters.set = FALSE; style->color_interpolation_filters.inherit = FALSE; - style->color_interpolation_filters.value = style->color_interpolation_filters.computed = SP_CSS_COLOR_INTERPOLATION_LINEARRGB; + style->color_interpolation_filters.value = style->color_interpolation_filters.computed = SP_CSS_COLOR_INTERPOLATION_SRGB; + //this line changed because rendering issues: Bug lp:1127103 + //style->color_interpolation_filters.value = style->color_interpolation_filters.computed = SP_CSS_COLOR_INTERPOLATION_LINEARRGB; + style->fill.clear(); style->fill.setColor(0.0, 0.0, 0.0); -- cgit v1.2.3