mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 14:41:50 +00:00
sw_engine: Rectified dash line drawing issue.
Omit the dash line when its length falls below a minimal threshold. This threshold is set to less than 0.0001 times the pixel size.
This commit is contained in:
parent
4f528d45f5
commit
04121ad2be
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ static void _dashLineTo(SwDashStroke& dash, const Point* to, const Matrix* trans
|
|||
_outlineLineTo(*dash.outline, to, transform);
|
||||
}
|
||||
} else {
|
||||
while (len > dash.curLen) {
|
||||
while (len - dash.curLen > 0.0001f) {
|
||||
Line left, right;
|
||||
if (dash.curLen > 0) {
|
||||
len -= dash.curLen;
|
||||
|
@ -189,7 +189,7 @@ static void _dashCubicTo(SwDashStroke& dash, const Point* ctrl1, const Point* ct
|
|||
_outlineCubicTo(*dash.outline, ctrl1, ctrl2, to, transform);
|
||||
}
|
||||
} else {
|
||||
while (len > dash.curLen) {
|
||||
while ((len - dash.curLen) > 0.0001f) {
|
||||
Bezier left, right;
|
||||
if (dash.curLen > 0) {
|
||||
len -= dash.curLen;
|
||||
|
|
Loading…
Add table
Reference in a new issue