0.0.9 dont close already closed paths
This commit is contained in:
parent
507cb5fba3
commit
e5cc9ba1b5
2 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
version = "0.0.8"
|
||||
version = "0.0.9"
|
||||
author = "Andre von Houck and Ryan Oldenburg"
|
||||
description = "Full-featured 2d graphics library for Nim."
|
||||
license = "MIT"
|
||||
|
|
|
@ -508,7 +508,11 @@ iterator segments*(s: seq[Vec2]): Segment =
|
|||
for i in 0 ..< s.len - 1:
|
||||
yield(Segment(at: s[i], to: s[i + 1]))
|
||||
if s.len > 0:
|
||||
yield(Segment(at: s[^1], to: s[0]))
|
||||
let
|
||||
first = s[0]
|
||||
last = s[^1]
|
||||
if first != last:
|
||||
yield(Segment(at: s[^1], to: s[0]))
|
||||
|
||||
proc strokePolygons*(ps: seq[seq[Vec2]], strokeWidthR, strokeWidthL: float32): seq[seq[Vec2]] =
|
||||
## Converts simple polygons into stroked versions:
|
||||
|
|
Loading…
Reference in a new issue