Need fallback for conic to cubic conversion
justvanrossum opened this issue · comments
This could be done with skia.Path.ConvertConicToQuads()
but that's currently not working for me: kyamagu/skia-python#115
Context: Skia outputs conic segments for ovals and arcs, and we need to convert to cubics or quads for path.drawToPen(pen)
.
I have a solution in place for the common case, but that breaks badly for the non-common case.
Not sure if you want to depend on two skia bindings at the same time, but https://github.com/fonttools/skia-pathops exposes that method to convert conic to quads (plus the pathops operations which I think the other bindings does not)
Oh that sounds great, I'll check it out, thanks!
Yeah, skia-python misses the main pathops entry point, so I was already considering using skia-pathops as a workaround.
There probably currently isn't a way to use a skia-python Path object directly in skia-pathops? It's a bit of a waste if I have to convert a SkPath instance to a SkPath instance via fonttools pens...
I don't know, the two projects use different binding techniques and embed different copies of the skia library.
If skia-python exposed all the API that we need in skia-pathops, i'd be happy to use that as the low level wrapper in skia-pathops and keep the latter only as a booleanOperations-like python-only interface.
On the other hand, skia-pathops is lean and mean(-ish...), and skia-python is rather bulky.
Further reference: kyamagu/skia-python#116