Skip to content

Commit

Permalink
Use trailPoints instead of trailVertices to match number of ends with…
Browse files Browse the repository at this point in the history
… trailSegments.

Fixes #263.
  • Loading branch information
robx committed Oct 1, 2015
1 parent 68cc983 commit 4025a2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Diagrams/TwoD/Offset.hs
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ offsetTrail' opts r t = joinSegments eps j isLoop (opts^.offsetMiterLimit) r end
where
eps = opts^.offsetEpsilon
offset = map (bindLoc (offsetSegment eps r)) . locatedTrailSegments
ends | isLoop = (\(a:as) -> as ++ [a]) . trailVertices $ t
| otherwise = tail . trailVertices $ t
ends | isLoop = (\(a:as) -> as ++ [a]) . trailPoints $ t
| otherwise = tail . trailPoints $ t
j = fromLineJoin (opts^.offsetJoin)

isLoop = withTrail (const False) (const True) (unLoc t)
Expand Down

0 comments on commit 4025a2e

Please sign in to comment.