-
Notifications
You must be signed in to change notification settings - Fork 39
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
Drawing a circle produes a path and not a circle. #121
Comments
I agree this would be nice! Currently, the https://hackage.haskell.org/package/diagrams-lib-1.4.6/docs/src/Diagrams.TwoD.Ellipse.html#circle This works for any backend that supports drawing Bézier segments, whether or not it supports drawing circles as a primitive. However, for backends that do support circles as primitive, such as SVG, it would be very nice to somehow remember the fact that the path is supposed to be a circle and be able to output it as such (or approximate it with Béziers at the last minute for backends which do not support primitive circles). This is something we have thought about before but it is not so simple. It's been a while since I've thought about it, but off the top of my head the needed changes would be something like this:
|
Ok. Thanks for responding. Sounds like the high cost of implementing direct support for circles wouldn't be justified. Such is life. |
Well, I think it could be justified, in the sense that I would happily merge a PR which implemented this. It would just be quite a bit of work and I don't have time to do it myself. But I posted my thoughts on the needed changes in case anyone else seeing this issue wants to take a shot at it. |
I'm doing the tutorial and the first example of drawing a circle produces an svg file which represents a circle as a path, instead of representing a circle as a circle element.
I would like to be leveraging the compactness of svg, and drawing a path for a circle seems to negate the inherent efficiency of the svg format.
(Viewing the circle in the browser the path of the circle is noticeably imperfect.)
The text was updated successfully, but these errors were encountered: