Merge pull request #41 from guzba/master

0.0.8 export for typography
This commit is contained in:
treeform 2020-12-29 15:22:29 -08:00 committed by GitHub
commit 507cb5fba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
version = "0.0.7"
version = "0.0.8"
author = "Andre von Houck and Ryan Oldenburg"
description = "Full-featured 2d graphics library for Nim."
license = "MIT"

View file

@ -498,12 +498,12 @@ proc commandsToPolygons*(commands: seq[PathCommand]): seq[seq[Vec2]] =
if polygon.len > 0:
result.add(polygon)
iterator zipline[T](s: seq[T]): (T, T) =
iterator zipline*[T](s: seq[T]): (T, T) =
## Return elements in pairs: (1st, 2nd), (2nd, 3rd) ... (nth, last).
for i in 0 ..< s.len - 1:
yield(s[i], s[i + 1])
iterator segments(s: seq[Vec2]): Segment =
iterator segments*(s: seq[Vec2]): Segment =
## Return elements in pairs: (1st, 2nd), (2nd, 3rd) ... (last, 1st).
for i in 0 ..< s.len - 1:
yield(Segment(at: s[i], to: s[i + 1]))