diff --git a/src/pixie/fileformats/svg.nim b/src/pixie/fileformats/svg.nim index 5ad0bcc..54f345c 100644 --- a/src/pixie/fileformats/svg.nim +++ b/src/pixie/fileformats/svg.nim @@ -148,9 +148,7 @@ proc decodeCtx(inherited: Ctx, node: XmlNode): Ctx = else: failInvalidTransform(transform) -proc draw( - img: Image, node: XmlNode, ctxStack: var seq[Ctx] -) = +proc draw(img: Image, node: XmlNode, ctxStack: var seq[Ctx]) = if node.kind != xnElement: # Skip return diff --git a/src/pixie/paths.nim b/src/pixie/paths.nim index ad3adef..a2447a9 100644 --- a/src/pixie/paths.nim +++ b/src/pixie/paths.nim @@ -640,7 +640,9 @@ proc commandsToShapes*(path: Path): seq[seq[Vec2]] = ) delta = delta mod (PI * 2) - if not sweep: + if sweep and delta < 0: + delta += 2 * PI + elif not sweep and delta > 0: delta -= 2 * PI # Normalize the delta diff --git a/tests/images/svg/twbs-icons.png b/tests/images/svg/twbs-icons.png index cc2b58f..112d78c 100644 Binary files a/tests/images/svg/twbs-icons.png and b/tests/images/svg/twbs-icons.png differ diff --git a/tests/megatest.nim b/tests/megatest.nim index c07c7dc..08634ce 100644 --- a/tests/megatest.nim +++ b/tests/megatest.nim @@ -1,4 +1,4 @@ -import os, pixie, strformat +import os, pixie, pixie/fileformats/svg, strformat # Clone https://github.com/twbs/icons # Check out commit f364cb14dfc0703b9e3ef10c8b490a71dfef1e9d