mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-26 08:09:14 +00:00
gl_engine: fix differences in dashing among engines
The differences resulted from discrepancies between the engines in applying equality or inequality signs. @Issue: https://github.com/thorvg/thorvg/issues/3265
This commit is contained in:
parent
52dc586089
commit
4f7d94cd8b
1 changed files with 2 additions and 2 deletions
|
@ -2300,7 +2300,7 @@ void DashStroke::dashLineTo(const GlPoint &to)
|
||||||
this->lineTo(curr.p2);
|
this->lineTo(curr.p2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCurrLen < 1) {
|
if (mCurrLen < 0.1f) {
|
||||||
mCurrIdx = (mCurrIdx + 1) % mDashCount;
|
mCurrIdx = (mCurrIdx + 1) % mDashCount;
|
||||||
mCurrLen = mDashPattern[mCurrIdx];
|
mCurrLen = mDashPattern[mCurrIdx];
|
||||||
mCurOpGap = !mCurOpGap;
|
mCurOpGap = !mCurOpGap;
|
||||||
|
@ -2352,7 +2352,7 @@ void DashStroke::dashCubicTo(const GlPoint &cnt1, const GlPoint &cnt2, const GlP
|
||||||
this->cubicTo(cur.ctrl1, cur.ctrl2, cur.end);
|
this->cubicTo(cur.ctrl1, cur.ctrl2, cur.end);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCurrLen < 1) {
|
if (mCurrLen < 0.1f) {
|
||||||
mCurrIdx = (mCurrIdx + 1) % mDashCount;
|
mCurrIdx = (mCurrIdx + 1) % mDashCount;
|
||||||
mCurrLen = mDashPattern[mCurrIdx];
|
mCurrLen = mDashPattern[mCurrIdx];
|
||||||
mCurOpGap = !mCurOpGap;
|
mCurOpGap = !mCurOpGap;
|
||||||
|
|
Loading…
Add table
Reference in a new issue