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

Need fallback for conic to cubic conversion #7

Open
justvanrossum opened this issue Sep 27, 2020 · 7 comments
Open

Need fallback for conic to cubic conversion #7

justvanrossum opened this issue Sep 27, 2020 · 7 comments

Comments

@justvanrossum
Copy link
Owner

This could be done with skia.Path.ConvertConicToQuads() but that's currently not working for me: kyamagu/skia-python#115

@justvanrossum
Copy link
Owner Author

justvanrossum commented Sep 27, 2020

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.

justvanrossum added a commit that referenced this issue Sep 27, 2020
@anthrotype
Copy link

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)

@justvanrossum
Copy link
Owner Author

justvanrossum commented Sep 27, 2020

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...

@anthrotype
Copy link

I don't know, the two projects use different binding techniques and embed different copies of the skia library.

@anthrotype
Copy link

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.

@justvanrossum
Copy link
Owner Author

On the other hand, skia-pathops is lean and mean(-ish...), and skia-python is rather bulky.

@justvanrossum
Copy link
Owner Author

Further reference: kyamagu/skia-python#116

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

No branches or pull requests

2 participants