Dark line between diagrams at certain widths #39

Open
JakeBr opened this Issue Jan 18, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@JakeBr

JakeBr commented Jan 18, 2014

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

main :: IO ()
main = defaultMain dia

dia :: Diagram B R2
dia = (s1 ||| s1) <> s2
  where s1 = square 1 # lw 0 # fc white
        s2 = square 2 # lw 0 # fc crimson

Looks fine with width 100:

test100

But there is a dark line between the squares with width 99:

test2

Tested on Ubuntu 13.04, Cairo 1.12.14

@JakeBr

This comment has been minimized.

Show comment Hide comment
@JakeBr

JakeBr Jan 18, 2014

Oh, I just noticed that the exact same thing happens with the SVG backend as well.

JakeBr commented Jan 18, 2014

Oh, I just noticed that the exact same thing happens with the SVG backend as well.

@fryguybob

This comment has been minimized.

Show comment Hide comment
@fryguybob

fryguybob Jan 18, 2014

Owner

It could be that this is just an artifact of filling areas that do not align with pixels. Some backends might be able to support aligning to the nearest pixel for some drawing actions. It could also be that if we were more careful about some rounding we would avoid it, but I doubt that that would always be able to help. I don't know of a good way to express aligning to pixels :(.

Owner

fryguybob commented Jan 18, 2014

It could be that this is just an artifact of filling areas that do not align with pixels. Some backends might be able to support aligning to the nearest pixel for some drawing actions. It could also be that if we were more careful about some rounding we would avoid it, but I doubt that that would always be able to help. I don't know of a good way to express aligning to pixels :(.

@bergey bergey added the numeric label Sep 8, 2014

@bergey bergey referenced this issue in diagrams/diagrams-lib Oct 12, 2014

Merged

New stuff #218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment