Support AsWinding in pathkit

28 views
Skip to first unread message

一丝

unread,
Apr 12, 2021, 12:01:10 PMApr 12
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 AMApr 14
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 AMApr 14
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 AMApr 14
to skia-discuss
Because directly setting path.setFillType to nonzero mode does not change the winding direction of the path.
Reply all
Reply to author
Forward
0 new messages