Merge pull request #34 from SebKuzminsky/fixup-offset-example

README: fix a type error in Offseting Paths example
pull/36/merge
Andy Port 2017-12-23 02:51:50 -08:00 committed by GitHub
commit c32c7a627b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -585,9 +585,8 @@ curve <https://en.wikipedia.org/wiki/Parallel_curve>`__ for a few paths.
of the 'parallel' offset curve.""" of the 'parallel' offset curve."""
nls = [] nls = []
for seg in path: for seg in path:
ct = 1
for k in range(steps): for k in range(steps):
t = k / steps t = k / float(steps)
offset_vector = offset_distance * seg.normal(t) offset_vector = offset_distance * seg.normal(t)
nl = Line(seg.point(t), seg.point(t) + offset_vector) nl = Line(seg.point(t), seg.point(t) + offset_vector)
nls.append(nl) nls.append(nl)