mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +00:00
sw_engine: fix a regression stroke bug
reverted changes that occurred this issue from d683d2e
Issue: https://github.com/thorvg/thorvg/issues/1670
This commit is contained in:
parent
7ec969be29
commit
e4ade98e8c
1 changed files with 4 additions and 0 deletions
|
@ -373,6 +373,10 @@ void _firstSubPath(SwStroke& stroke, SwFixed startAngle, SwFixed lineLength)
|
||||||
static void _lineTo(SwStroke& stroke, const SwPoint& to)
|
static void _lineTo(SwStroke& stroke, const SwPoint& to)
|
||||||
{
|
{
|
||||||
auto delta = to - stroke.center;
|
auto delta = to - stroke.center;
|
||||||
|
|
||||||
|
//a zero-length lineto is a no-op; avoid creating a spurious corner
|
||||||
|
if (delta.zero()) return;
|
||||||
|
|
||||||
//compute length of line
|
//compute length of line
|
||||||
auto angle = mathAtan(delta);
|
auto angle = mathAtan(delta);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue