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

Flutter #34

Open
TomaszCz opened this issue Oct 28, 2024 · 0 comments
Open

Flutter #34

TomaszCz opened this issue Oct 28, 2024 · 0 comments

Comments

@TomaszCz
Copy link

I wonder how can i use TinyVg in my flutter project? Any of you considered creating a plug in to draw that format onto Flutter canvas? Or maybe there is already some parser? I saw specs and i see each TinyVg command should be supported by Flutter Canvas, so the task seems to be quite simple.

https://api.flutter.dev/flutter/dart-ui/Canvas/drawLine.html
https://api.flutter.dev/flutter/dart-ui/Path/cubicTo.html
https://api.flutter.dev/flutter/dart-ui/Canvas/drawOval.html
https://api.flutter.dev/flutter/dart-ui/Canvas/drawPath.html

I can also read binary data of TinyVg using dart:typed_data - possible.

Still, I see one issue, TinyVG uses different color encodings than what i have in flutter. Not sure how to approach that.
In particular, flutter doesn't directly support grayscale as a separate color mode it is rather 32-bit RGBA. So the question is, how could i represent TinyVg formats that are compatible with Flutter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant