How to use Path.MakeFromSVGString in CanvasKit?

65 views
Skip to first unread message

Acbox Sky

unread,
Apr 12, 2024, 12:52:39 AMApr 12
to skia-discuss
I try to use the follwing code to make a path from svg string:

ck.Path.MakeFromSVGString('<svg width="100" height="100"><circle r="50"/></svg>'), biut it returns null. I try to find it's usage but I can't find.

I think my usage was wrong

John Stiles

unread,
Apr 12, 2024, 7:50:25 AMApr 12
to skia-d...@googlegroups.com
This API is meant to take an SVG path definition, not a complete SVG image. 

I don't think CanvasKit includes support for SkSVGDOM, unfortunately. But here is a C++ example of parsing an SVG from Skia: 


--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/906f86e2-6657-4611-ab29-13281cde7d5an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages