Support AsWinding in pathkit

80 views
Skip to first unread message

一丝

unread,
Apr 12, 2021, 12:01:10 PM4/12/21
to skia-discuss
In Opentype fonts, fill-rule only supports nonzero mode, and there is no API to modify fill-rule and remove overlaps in the pathkit API. In skia this should be the AsWinding function, hopefully it can be exposed to pathkit.

Finally, I hope that the function of pathkit can be aligned with Python's skia-pathops module.https://github.com/fonttools/skia-pathops/issues/10

画板@2x.png

kjlu...@google.com

unread,
Apr 14, 2021, 8:50:32 AM4/14/21
to skia-discuss
I believe the winding type of a path can already be changed in PathKit using the setFillType API

For example
path.setFillType(PathKit.FillType.WINDING);

I believe the underlying Skia setting, SkPathFillType::kWinding, is the nonzero mode you describe.

Let me know if this existing API is not sufficient.

一丝

unread,
Apr 14, 2021, 9:15:03 AM4/14/21
to skia-discuss
This is not enough, I need to acquire the ability of asWinding. I submitted an issue: https://bugs.chromium.org/p/skia/issues/detail?id=11858

一丝

unread,
Apr 14, 2021, 9:22:31 AM4/14/21
to skia-discuss
Because directly setting path.setFillType to nonzero mode does not change the winding direction of the path.

一丝

unread,
Jul 17, 2021, 11:13:59 AM7/17/21
to skia-discuss
Is there any progress?
Reply all
Reply to author
Forward
0 new messages