Skip to content

Commit

Permalink
temporarily disable AsWinding until it's fully fledged
Browse files Browse the repository at this point in the history
there's an annoying SkDebugf statement left that prints lots of incomplete!
warnings. Let's revert for now.
#10 (comment)
  • Loading branch information
anthrotype committed Aug 17, 2018
1 parent 8a68db6 commit 41c4b58
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/python/pathops/_pathops.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -946,12 +946,14 @@ cpdef bint winding_from_even_odd(Path path, bint truetype=False) except False:
The outermost contours are set to counter-clockwise direction, unless
'truetype' is True.
"""
if AsWinding(path.path, &path.path):
if path.clockwise ^ truetype:
path.reverse()
return True

# in the unlikely event the built-in method fails, try our naive approach
# TODO re-enable this once the new feature is stabilized in upstream skia
# https://github.com/fonttools/skia-pathops/issues/10
# if AsWinding(path.path, &path.path):
# if path.clockwise ^ truetype:
# path.reverse()
# return True
#
# # in the unlikely event the built-in method fails, try our naive approach

cdef int i, j
cdef bint inverse = not truetype
Expand Down

0 comments on commit 41c4b58

Please sign in to comment.