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:
|
else:
|
||||||
failInvalidTransform(transform)
|
failInvalidTransform(transform)
|
||||||
|
|
||||||
proc draw(
|
proc draw(img: Image, node: XmlNode, ctxStack: var seq[Ctx]) =
|
||||||
img: Image, node: XmlNode, ctxStack: var seq[Ctx]
|
|
||||||
) =
|
|
||||||
if node.kind != xnElement:
|
if node.kind != xnElement:
|
||||||
# Skip <!-- comments -->
|
# Skip <!-- comments -->
|
||||||
return
|
return
|
||||||
|
|
|
@ -640,7 +640,9 @@ proc commandsToShapes*(path: Path): seq[seq[Vec2]] =
|
||||||
)
|
)
|
||||||
delta = delta mod (PI * 2)
|
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
|
delta -= 2 * PI
|
||||||
|
|
||||||
# Normalize the delta
|
# 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
|
# Clone https://github.com/twbs/icons
|
||||||
# Check out commit f364cb14dfc0703b9e3ef10c8b490a71dfef1e9d
|
# Check out commit f364cb14dfc0703b9e3ef10c8b490a71dfef1e9d
|
||||||
|
|
Loading…
Reference in a new issue