-
Notifications
You must be signed in to change notification settings - Fork 124
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
Fix kurbo::BezPath d attribute for xilem_web::svg::path element #715
Conversation
Whoops, not sure how that did happen... Nice catch, I thought I tested this, but this is the only kurbo view that's not in the svgtoy example... Bad luck... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Should we have an example which uses this? |
I wanted to add the stroke expansion demo in here as example, that would include this as well, we can of course also extend the (somewhat catch-all) svgtoy example. |
Add a simple example showing, that svg nodes can also be used similarly as a `CanvasRenderingContext2D` to draw some lines. This takes advantage of a `kurbo::QuadSpline` to avoid sharp edges when the pointer moves fast. See [this](https://xi.zulipchat.com/#narrow/channel/354396-xilem/topic/web.3A.20Canvas.20options.20set.20with.20.60after_build.60.20doesn't.20persist) zulip topic for more context. This could potentially be optimized further (don't clone/recalculate all the lines every reconciliation), but I think in its current state it's also a good test to see how a naive implementation performs, and so far it's not too bad. Btw. as noted [here](#715 (comment)) this implicitly also adds the `BezPath` as the example (for more manual testing opportunities).
Regressed in #699
cc @Philipp-M 🦆