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

Dust off xilem_svg #139

Merged
merged 6 commits into from
Nov 5, 2023
Merged

Dust off xilem_svg #139

merged 6 commits into from
Nov 5, 2023

Conversation

raphlinus
Copy link
Contributor

This patch updates the xilem_svg crate to make it suitable for tinkering. The demo app is moved to a separate crate, rather than being hardwired, and the ViewExt trait is wired up properly (replacing the previous KurboShape hack).

Instead of having the demo app hardcoded, make it a library with a web_examples folder, just like its xilem_html sibling. This patch doesn't change the example or any functionality.
Exports a `ViewExt` trait, and wires up types so that type inference can flow through the methods on this trait. That removes the hacky `KurboShape` workaround.
Supports very basic fill and stroke (solid colors, stroke width but no other style parameters).
@DJMcNab
Copy link
Member

DJMcNab commented Oct 26, 2023

I think the readme of xilem_svg should be updated. web_examples probably also needs a readme - probably mostly copying the xilem_svg readme

@raphlinus
Copy link
Contributor Author

Agree on the readme change. In fact, I did a small update but it seems like that got lost (probably a git restore when I was struggling with the ViewExt changes). I'll redo that, and also add one in web_examples as well.

Fix some cut'n'paste errors, and update README slightly.
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.

Took another look, looks good.

@raphlinus raphlinus added this pull request to the merge queue Nov 5, 2023
Merged via the queue into main with commit 71d1db0 Nov 5, 2023
7 checks passed
@DJMcNab DJMcNab deleted the svg_tinkering branch April 28, 2024 16:29
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.

3 participants