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).
This commit is contained in:
Mira Grudzinska 2021-04-09 12:34:56 +02:00 committed by Mira Grudzinska
parent 35fdc9a278
commit 30ee03002b

View file

@ -1036,10 +1036,10 @@ bool rasterGradientStroke(SwSurface* surface, SwShape* shape, unsigned id)
if (!shape->stroke->fill || !shape->strokeRle) return false; if (!shape->stroke->fill || !shape->strokeRle) return false;
if (id == FILL_ID_LINEAR) { 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); return _rasterOpaqueLinearGradientRle(surface, shape->strokeRle, shape->stroke->fill);
} else { } 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); return _rasterOpaqueRadialGradientRle(surface, shape->strokeRle, shape->stroke->fill);
} }