MCPcopy Create free account
hub / github.com/Image-Py/imagepy / roots

Function roots

imagepy/core/draw/polygonfill.py:24–30  ·  view source on GitHub ↗
(polys, buf, y)

Source from the content-addressed store, hash-verified

22 return cur
23
24def roots(polys, buf, y):
25 rs = []
26 for i in buf:
27 poly = polys[i[0]]
28 i1,i2 = i, (i[0],(i[1]+1)%len(poly))
29 rs.append(f(poly[i1[1]], poly[i2[1]],y))
30 return np.sort(rs)
31
32def fill(plgs, img, color = 1, o=(0,0)):
33 polys = [np.array(plg[:-1])-0.5 for plg in plgs]

Callers 1

fillFunction · 0.85

Calls 2

appendMethod · 0.80
fFunction · 0.70

Tested by

no test coverage detected