tdf#163131 CairoSDPR:

Added BColorModifierStack to SVG linear and radial
gradient direct support, was missing.

Change-Id: I1405ea0653180fa695b40082bf8b8520441d0620
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173871
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
This commit is contained in:
Armin Le Grand (Collabora) 2024-09-24 18:01:11 +02:00 committed by Armin Le Grand
parent 3c82f49fce
commit dad5b34d01

View file

@ -3366,9 +3366,9 @@ void CairoPixelProcessor2D::processSvgLinearGradientPrimitive2D(
for (const auto& entry : rGradientEntries)
{
const basegfx::BColor& rColor(entry.getColor());
cairo_pattern_add_color_stop_rgba(pPattern, entry.getOffset(), rColor.getRed(),
rColor.getGreen(), rColor.getBlue(), entry.getOpacity());
const basegfx::BColor aColor(maBColorModifierStack.getModifiedColor(entry.getColor()));
cairo_pattern_add_color_stop_rgba(pPattern, entry.getOffset(), aColor.getRed(),
aColor.getGreen(), aColor.getBlue(), entry.getOpacity());
}
// set SpreadMethod. Note that we have no SpreadMethod::None because the
@ -3462,9 +3462,9 @@ void CairoPixelProcessor2D::processSvgRadialGradientPrimitive2D(
for (const auto& entry : rGradientEntries)
{
const basegfx::BColor& rColor(entry.getColor());
cairo_pattern_add_color_stop_rgba(pPattern, entry.getOffset(), rColor.getRed(),
rColor.getGreen(), rColor.getBlue(), entry.getOpacity());
const basegfx::BColor aColor(maBColorModifierStack.getModifiedColor(entry.getColor()));
cairo_pattern_add_color_stop_rgba(pPattern, entry.getOffset(), aColor.getRed(),
aColor.getGreen(), aColor.getBlue(), entry.getOpacity());
}
// set SpreadMethod