From 30ee03002b7dbf6e218627b931e0cd130626a0eb Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Fri, 9 Apr 2021 12:34:56 +0200 Subject: [PATCH] sw_engine: fixing stroke gradient Instead of checking the stroke's fill, the shape's fill was checked. As a result the improper rastering function was called (or none). --- src/lib/sw_engine/tvgSwRaster.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/sw_engine/tvgSwRaster.cpp b/src/lib/sw_engine/tvgSwRaster.cpp index b9ab35c1..b1174129 100644 --- a/src/lib/sw_engine/tvgSwRaster.cpp +++ b/src/lib/sw_engine/tvgSwRaster.cpp @@ -1036,10 +1036,10 @@ bool rasterGradientStroke(SwSurface* surface, SwShape* shape, unsigned id) if (!shape->stroke->fill || !shape->strokeRle) return false; if (id == FILL_ID_LINEAR) { - if (shape->fill && shape->fill->translucent) return _rasterTranslucentLinearGradientRle(surface, shape->strokeRle, shape->stroke->fill); + if (shape->stroke->fill->translucent) return _rasterTranslucentLinearGradientRle(surface, shape->strokeRle, shape->stroke->fill); return _rasterOpaqueLinearGradientRle(surface, shape->strokeRle, shape->stroke->fill); } else { - if (shape->fill && shape->fill->translucent) return _rasterTranslucentRadialGradientRle(surface, shape->strokeRle, shape->stroke->fill); + if (shape->stroke->fill->translucent) return _rasterTranslucentRadialGradientRle(surface, shape->strokeRle, shape->stroke->fill); return _rasterOpaqueRadialGradientRle(surface, shape->strokeRle, shape->stroke->fill); }