mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 03:54:25 +00:00
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:
parent
35fdc9a278
commit
30ee03002b
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue