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

Code generation support #38

Closed
dnfield opened this issue Jul 30, 2018 · 7 comments
Closed

Code generation support #38

dnfield opened this issue Jul 30, 2018 · 7 comments

Comments

@dnfield
Copy link
Owner

dnfield commented Jul 30, 2018

It should be entirely possible to generate the DrawableRoot and children from SVG data at compile time, thus sparing parsing.

This is a different take than trying to make things serializable, which should have a few advantages:

  • No parsing time at runtime
  • No concerns about future-compatibility with a serialized Path, Paint, Shader, etc.

But a few limitations:

  • No support for dynamic loading of an asset over network etc. (but that could still be supported with existing implementation)

See also dnfield/flutter_path_drawing#2

@ghost
Copy link

ghost commented Aug 1, 2018

@dnfield wow pretty cool.

Can you please design this so we can still use runtime building. Compile time building is great for stuff you know wont change, but runtime is really useful because i am working on using the SVG package with with HTML Flutter. Togather i get the ability to have everything interpreted at runtime.

@dnfield
Copy link
Owner Author

dnfield commented Aug 1, 2018

I have no plans to deprecate runtime loading/rendering. This would basically just allow for parsing and generating the Drawable at compile time

@dnfield
Copy link
Owner Author

dnfield commented Aug 2, 2018

@dnfield
Copy link
Owner Author

dnfield commented Aug 4, 2018

It's looking like to do this sensibly will require decoupling the parsing logic a bit more.

Just want to make sure to not bloat up memory requirements when doing so...

@dnfield
Copy link
Owner Author

dnfield commented Aug 10, 2018

This is blocked by #47 - not so much because of DOM, but because parsing needs to be rewritten a bit to make this make sense.

@Leptopoda
Copy link

Hi there,
any progress on that? I've read a bit in your other repos (like flutter_built_path or flutter_path_drawing) but they seem to only apply to paths. I'd like to throw entire svg's into it and do its thing.

Am I just missing something in the other repos?

@dnfield
Copy link
Owner Author

dnfield commented Mar 29, 2022

I do not intend to work on this anymore, and am instead looking into working on a new package (https://github.com/dnfield/vector_graphics) that captures the spirit of this issue.

@dnfield dnfield closed this as completed Mar 29, 2022
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

No branches or pull requests

2 participants