Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upConsider using arc to draw circles #2
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jwmerrill
Nov 11, 2014
Contributor
A downside of this is that it would add complexity, since currently Shape is just an alias for [(float, float)].
It's also kind of annoying to extend this technique to drawing ellipses. There is an upcoming ellipse method, but it doesn't currently have wide browser support. Until then, one way to draw ellipses is to scale the canvas, draw a circle, unscale the canvas, and then stroke the circle.
|
A downside of this is that it would add complexity, since currently It's also kind of annoying to extend this technique to drawing ellipses. There is an upcoming |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Nov 11, 2014
Member
Totally on my todo list!
I'm currently in a push to get 0.14 out, but after that one of the big goals will be improving elm-html and Graphics.Element/Collage/Input. This includes interop between them, efficiency, and API.
I've been wanting to add bezier curves, arcs, etc. to Collage for ages so that falls in nicely with the revamp of the Graphics... implementation that is coming up.
|
Totally on my todo list! I'm currently in a push to get 0.14 out, but after that one of the big goals will be improving elm-html and Graphics.Element/Collage/Input. This includes interop between them, efficiency, and API. I've been wanting to add bezier curves, arcs, etc. to Collage for ages so that falls in nicely with the revamp of the Graphics... implementation that is coming up. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Nov 11, 2014
Member
Long ago I kept running into issues getting the API for curved paths to feel right and to turn into a nice implementation.
Now that you've pushed me to revisit even at a high-level, I have some thoughts on refactoring the modules that could be really helpful :) It's interesting how "the right design" is time dependent. Early on the existing module structure was obviously correct, but now it sorta makes sense to split out Collage as a project of its own. We'll see!
Thanks for opening this thread! :)
|
Long ago I kept running into issues getting the API for curved paths to feel right and to turn into a nice implementation. Now that you've pushed me to revisit even at a high-level, I have some thoughts on refactoring the modules that could be really helpful :) It's interesting how "the right design" is time dependent. Early on the existing module structure was obviously correct, but now it sorta makes sense to split out Collage as a project of its own. We'll see! Thanks for opening this thread! :) |
pushed a commit
that referenced
this issue
Jan 18, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
May 11, 2016
Member
Sorry this did not get attention til now! The Graphics.* modules now live in evancz/elm-graphics so I am trying to get stuff migrated over there.
I'd like to keep it relatively stable for now though. I expect to be focusing on <canvas> for professional users and "friendly graphics" for learning as separate use cases. Progress will be made when those start happening.
|
Sorry this did not get attention til now! The I'd like to keep it relatively stable for now though. I expect to be focusing on |
jwmerrill commentedNov 11, 2014
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.arc
Currently, circles are rendered as a 50-gon, which is (just barely) perceptibly pointy.