mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
common: add missing condition while trimming
The idea of introducing epsilon during trimming was to
eliminate the occurrence of short segments whose length
would be zero when higher computational accuracy was used.
By mistake, during the refactor of 8ed4c2f302
,
one of the conditions was lost. Fixed.
@Issue: https://github.com/thorvg/thorvg/issues/3053
This commit is contained in:
parent
37c4ace685
commit
d5125bd839
1 changed files with 2 additions and 2 deletions
|
@ -224,8 +224,8 @@ static void _trimPath(const PathCommand* inCmds, uint32_t inCmdsCnt, const Point
|
|||
if (len + dLen > trimEnd) {
|
||||
_trimAt(cmds, pts, moveTo, 0.0f, trimEnd - len, start, out);
|
||||
start = true;
|
||||
//add the whole segment
|
||||
} else _add(cmds, pts, moveTo, start, out);
|
||||
//add the whole segment
|
||||
} else if (len + dLen > trimStart + EPSILON) _add(cmds, pts, moveTo, start, out);
|
||||
}
|
||||
|
||||
len += dLen;
|
||||
|
|
Loading…
Add table
Reference in a new issue