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

Local headLength / headGaps act like Output #193

Closed
byorgey opened this issue Jun 3, 2014 · 1 comment · Fixed by #194
Closed

Local headLength / headGaps act like Output #193

byorgey opened this issue Jun 3, 2014 · 1 comment · Fixed by #194

Comments

@byorgey
Copy link
Member

byorgey commented Jun 3, 2014

Consider:

{-# LANGUAGE NoMonomorphismRestriction #-}

import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine

dia = hcat' (with & sep .~ 1) [circle 1 # named 'A', circle 1 # named 'B']
      # connectOutside' (with & headGap .~ Local 0.3) 'A' 'B'

main = defaultMain (dia # frame 0.5)

I would expect a rather significant gap at the front of the arrow. However, rendering at 400x400 yields:

localarrowhead

On the other hand,

{-# LANGUAGE NoMonomorphismRestriction #-}

import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine

dia = hcat' (with & sep .~ 1) [circle 1 # named 'A', circle 1 # named 'B']
      # connectOutside' (with & headGap .~ Local 30) 'A' 'B'

main = defaultMain (dia # frame 0.5)

renders as

localarrowhead2

@byorgey
Copy link
Member Author

byorgey commented Jun 3, 2014

Note that tailGap, headLength, and tailLength all display similar behavior.

bergey added a commit that referenced this issue Jun 4, 2014
bergey added a commit that referenced this issue Jun 4, 2014
closes #193

(cherry picked from commit f057ada)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant