Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusting trail from the end has no effect #95

Closed
byorgey opened this issue Aug 13, 2013 · 1 comment
Closed

Adjusting trail from the end has no effect #95

byorgey opened this issue Aug 13, 2013 · 1 comment
Labels

Comments

@byorgey
Copy link
Member

byorgey commented Aug 13, 2013

{-# LANGUAGE NoMonomorphismRestriction #-}
-----------------------------------------------------------------------------

module Main where

import Diagrams.Prelude
import Diagrams.Backend.SVG
import Diagrams.Backend.SVG.CmdLine

l1 = straight unitX
l2 = straight unitX # rotateBy (1/12)
t = trailFromSegments [l1, l2]

t1 = adjust t with { adjMethod = ByAbsolute (-0.5), adjSide = Start}

t2 = adjust t with { adjMethod = ByAbsolute (-0.5), adjSide = End}

ex = strokeT t === strutY 0.25
               === strokeT t1 === strutY 0.25
               === strokeT t2

main = defaultMain $ ex # centerXY # pad 1.1

produces:

Note how the final trail looks identical to the first; instead, its end should be shorter.

The bug is probably somewhere in the Sectionable instance for Trail.

@jeffreyrosenbluth
Copy link
Member

Repaired, added reverseDomain to Sectionable instance of Trail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants