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

All lines render at same width #222

Closed
jeffreyrosenbluth opened this issue Oct 28, 2014 · 5 comments
Closed

All lines render at same width #222

jeffreyrosenbluth opened this issue Oct 28, 2014 · 5 comments

Comments

@jeffreyrosenbluth
Copy link
Member

I'm not sure if the bug is in -core, -lib, or -svg,
but it came with new-stuff @cchalmers

{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine

line = strokeT . fromOffsets $ [unitX]

example :: Diagram B
example = vcat' (with & sep .~ 0.1)
  [line # lw w | w <- [ultraThin, veryThin, thin,
                       medium, thick, veryThick, ultraThick]]

main = mainWith $ example # frame 0.2
@jeffreyrosenbluth jeffreyrosenbluth changed the title All line render at same width All lines render at same width Oct 28, 2014
@cchalmers
Copy link
Member

They're not all the same. The thin ones are getting rounded up because they all have ``atLeast output 0.5 attached to them. Try it with `tiny`, `normal` and `huge`.

@jeffreyrosenbluth
Copy link
Member Author

OK, but the example is taken form the manual and they should look like:

http://projects.haskell.org/diagrams/doc/manual.html#modifying-diagrams

the section on line width.

These measures, are meant to be used with line width, so should give a nice diversity of widths.

tiny, normal and huge are meant for arrowheads.

@cchalmers
Copy link
Member

Ah, I got my atLeast and atMost mixed up. :)

@jeffreyrosenbluth
Copy link
Member Author

I had a feeling it was something simple, you did say there would
probably still be a few bugs :)

@jeffreyrosenbluth
Copy link
Member Author

fixed with diagrams-core cc2e2d3

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

No branches or pull requests

2 participants