Skip to content

Commit

Permalink
declare keep_starting_points as 'bint' type
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Sep 27, 2020
1 parent 0efea4f commit b30b511
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/python/pathops/_pathops.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ cdef class Path:

cpdef reverse(self)

cpdef simplify(self, bint fix_winding=*, keep_starting_points=*)
cpdef simplify(self, bint fix_winding=*, bint keep_starting_points=*)

cpdef convertConicsToQuads(self, float tolerance=*)

Expand Down Expand Up @@ -307,12 +307,12 @@ cpdef Path op(
Path one,
Path two,
SkPathOp operator,
fix_winding=*,
keep_starting_points=*,
bint fix_winding=*,
bint keep_starting_points=*,
)


cpdef Path simplify(Path path, fix_winding=*, keep_starting_points=*)
cpdef Path simplify(Path path, bint fix_winding=*, bint keep_starting_points=*)


cdef class OpBuilder:
Expand Down
18 changes: 9 additions & 9 deletions src/python/pathops/_pathops.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ cdef class Path:
skpath.addPath(contour.path)
self.path = skpath

cpdef simplify(self, bint fix_winding=True, keep_starting_points=True):
cpdef simplify(self, bint fix_winding=True, bint keep_starting_points=True):
cdef list first_points
if keep_starting_points:
first_points = self.firstPoints
Expand Down Expand Up @@ -626,10 +626,10 @@ cdef class Path:
>>> affine = (2, 0, 0, 2, 0, 0)
>>> p2 = p1.transform(*affine)
>>> list(p2.segments) == [
('moveTo', ((2.0, 4.0),)),
('lineTo', ((6.0, 8.0),)),
('endPath', ()),
]
... ('moveTo', ((2.0, 4.0),)),
... ('lineTo', ((6.0, 8.0),)),
... ('endPath', ()),
... ]
True
"""
cdef SkMatrix matrix = SkMatrix.MakeAll(
Expand Down Expand Up @@ -1374,8 +1374,8 @@ cpdef Path op(
Path one,
Path two,
SkPathOp operator,
fix_winding=True,
keep_starting_points=True
bint fix_winding=True,
bint keep_starting_points=True
):
cdef list first_points
if keep_starting_points:
Expand All @@ -1390,7 +1390,7 @@ cpdef Path op(
return result


cpdef Path simplify(Path path, fix_winding=True, keep_starting_points=True):
cpdef Path simplify(Path path, bint fix_winding=True, bint keep_starting_points=True):
cdef list first_points
if keep_starting_points:
first_points = path.firstPoints
Expand All @@ -1406,7 +1406,7 @@ cpdef Path simplify(Path path, fix_winding=True, keep_starting_points=True):

cdef class OpBuilder:

def __init__(self, bint fix_winding=True, keep_starting_points=True):
def __init__(self, bint fix_winding=True, bint keep_starting_points=True):
self.fix_winding = fix_winding
self.keep_starting_points = keep_starting_points
self.first_points = []
Expand Down

0 comments on commit b30b511

Please sign in to comment.