sweep flag fix for svg icons
This commit is contained in:
parent
693191840b
commit
fc2dc50c39
4 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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 |
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue