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

Fix kurbo::BezPath d attribute for xilem_web::svg::path element #715

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

RagibHasin
Copy link
Contributor

Regressed in #699

cc @Philipp-M 🦆

xorgy
xorgy previously requested changes Oct 25, 2024
xilem_web/src/svg/kurbo_shape.rs Outdated Show resolved Hide resolved
@Philipp-M
Copy link
Contributor

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...

Copy link
Contributor

@Philipp-M Philipp-M left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Philipp-M Philipp-M dismissed xorgy’s stale review October 25, 2024 17:27

Requested changes are handled

@Philipp-M Philipp-M enabled auto-merge October 25, 2024 17:27
@Philipp-M Philipp-M added this pull request to the merge queue Oct 25, 2024
@DJMcNab
Copy link
Member

DJMcNab commented Oct 25, 2024

Should we have an example which uses this?

@Philipp-M
Copy link
Contributor

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.

Merged via the queue into linebender:main with commit 16df671 Oct 25, 2024
17 checks passed
@RagibHasin RagibHasin deleted the web-kurbo-bezpath-data branch October 25, 2024 17:50
github-merge-queue bot pushed a commit that referenced this pull request Nov 9, 2024
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).
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

Successfully merging this pull request may close these issues.

4 participants