-
Notifications
You must be signed in to change notification settings - Fork 20
Description
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.