-
Notifications
You must be signed in to change notification settings - Fork 15
Description
pathops seems to be both much faster and more accurate than booleanOperations and seems far preferable for instancing a glyph. However, there are other cases where one wants to remove overlap from a glyph for purposes of analysis rather than final product, and one may only want to do so when there is overlap to be removed. For that, one would either want a state passed back with the output or -- given how fast the library is -- a method that can be called first to ask whether overlap will be removed.
(Simple analysis of the result doesn't answer the question because of the other changes -- combined lines, added inflection points, and so on.)
I haven't entirely convinced myself but I suspect this question is close enough to the question "Are there any inter-segment intersections?" that the latter could serve for the former. If that's accurate then maybe one could replicate the non-debugging portions of SkPathOpsSimplify.cpp:SimplifyDebug() up to before HandleCoincidence() and query the coincidence object.
I don't really expect the maintainers to do this work themselves -- I'm filing to track a desirable thing that I may try to implement in the future.