Merge pull request #121 from guzba/master

sweep flag fix for svg icons
This commit is contained in:
treeform 2021-02-22 22:36:43 -08:00 committed by GitHub
commit c45486ad9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -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 <!-- comments -->
return

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 KiB

After

Width:  |  Height:  |  Size: 543 KiB

View file

@ -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