mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
sw_engine/shape: fix a dash-line infite-loop bug.
a regresion bug was introduced by d683d2e70d
This commit is contained in:
parent
bd9d0cea6d
commit
edb156f4fc
1 changed files with 2 additions and 2 deletions
|
@ -129,8 +129,7 @@ static void _dashLineTo(SwDashStroke& dash, const Point* to, const Matrix* trans
|
|||
Line left, right;
|
||||
if (dash.curLen > 0) {
|
||||
len -= dash.curLen;
|
||||
_lineSplitAt(cur, dash.curLen, left, right);;
|
||||
dash.curIdx = (dash.curIdx + 1) % dash.cnt;
|
||||
_lineSplitAt(cur, dash.curLen, left, right);
|
||||
if (!dash.curOpGap) {
|
||||
_outlineMoveTo(*dash.outline, &left.pt1, transform);
|
||||
_outlineLineTo(*dash.outline, &left.pt2, transform);
|
||||
|
@ -138,6 +137,7 @@ static void _dashLineTo(SwDashStroke& dash, const Point* to, const Matrix* trans
|
|||
} else {
|
||||
right = cur;
|
||||
}
|
||||
dash.curIdx = (dash.curIdx + 1) % dash.cnt;
|
||||
dash.curLen = dash.pattern[dash.curIdx];
|
||||
dash.curOpGap = !dash.curOpGap;
|
||||
cur = right;
|
||||
|
|
Loading…
Add table
Reference in a new issue