mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
sw_engine/fill: fix a linear filling scaling issue.
The condition is not valid, Let it draw the fill as it's requested. Issue: https://github.com/thorvg/thorvg/issues/1834
This commit is contained in:
parent
31fdd5d313
commit
58961f84d5
2 changed files with 1 additions and 2 deletions
|
@ -167,7 +167,6 @@ bool _prepareLinear(SwFill* fill, const LinearGradient* linear, const Matrix* tr
|
|||
fill->linear.dy = dx * invTransform.e12 + fill->linear.dy * invTransform.e22;
|
||||
|
||||
fill->linear.len = fill->linear.dx * fill->linear.dx + fill->linear.dy * fill->linear.dy;
|
||||
if (fill->linear.len < FLT_EPSILON) return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1714,7 +1714,7 @@ static bool _rasterSolidGradientRle(SwSurface* surface, const SwRleData* rle, co
|
|||
|
||||
static bool _rasterLinearGradientRle(SwSurface* surface, const SwRleData* rle, const SwFill* fill)
|
||||
{
|
||||
if (!rle || fill->linear.len < FLT_EPSILON) return false;
|
||||
if (!rle) return false;
|
||||
|
||||
if (_compositing(surface)) {
|
||||
if (_matting(surface)) return _rasterGradientMattedRle<FillLinear>(surface, rle, fill);
|
||||
|
|
Loading…
Add table
Reference in a new issue