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

SVG backend doesn't fill loops if they occur in the same subtree as a line #43

Closed
byorgey opened this issue Nov 21, 2013 · 2 comments
Closed

Comments

@byorgey
Copy link
Member

byorgey commented Nov 21, 2013

It looks like #42 was a bit more subtle than I thought. See the last line of http://projects.haskell.org/diagrams/backend-tests/all-index.html .

The problem is that a style node may occur at the root of a subtree which contains both lines and loops. In that case it seems that the only possible solution is to actually split the style node and push fill attributes down until they are over a subtree which contains only loops.

In fact, perhaps we even ought to do this as a compilation pass, in diagrams-core. We could make sure that fill attributes are only ever at the root of subtrees containing all loops. Then backends wouldn't have to worry about it at all, but could simply issue a fill attribute when they see it.

@byorgey
Copy link
Member Author

byorgey commented Nov 21, 2013

To do this in diagrams-core would require adding Typeable constraints to primitives, so we can examine them without giving a Renderable instance. We've decided to do this anyway, so I'm not worried about that, but in any case this is not a quick fix. I'm inclined to leave this until after the 1.0 release --- this is not the sort of thing users will be running into a lot, and if they do, there are simple enough workarounds for the moment.

@jeffreyrosenbluth
Copy link
Member

I agree, we should not try to rush a fix in before 1.0. Additionally, I
don't think 1.1 will be far behind.

On Thu, Nov 21, 2013 at 4:17 PM, Brent Yorgey notifications@github.comwrote:

To do this in diagrams-core would require adding Typeable constraints to
primitives, so we can examine them without giving a Renderable instance.
We've decided to do this anyway, so I'm not worried about that, but in any
case this is not a quick fix. I'm inclined to leave this until after the
1.0 release --- this is not the sort of thing users will be running into a
lot, and if they do, there are simple enough workarounds for the moment.


Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-29025369
.

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