mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
sw_engine fill: fixing gradient calculations for 'repeat' spread value
There was a call to the ctable element from outside its boundaries, because the check was misplaced.
This commit is contained in:
parent
5bbe713ca5
commit
a0f28d0db4
1 changed files with 2 additions and 2 deletions
|
@ -171,8 +171,8 @@ static inline uint32_t _clamp(const SwFill* fill, int32_t pos)
|
|||
break;
|
||||
}
|
||||
case FillSpread::Repeat: {
|
||||
if (pos < 0) pos = GRADIENT_STOP_SIZE + pos;
|
||||
pos = pos % GRADIENT_STOP_SIZE;
|
||||
if (pos < 0) pos = GRADIENT_STOP_SIZE + pos;
|
||||
break;
|
||||
}
|
||||
case FillSpread::Reflect: {
|
||||
|
|
Loading…
Add table
Reference in a new issue