Skip to content

Flutter #34

@TomaszCz

Description

@TomaszCz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions