fonttools: PointInsidePen failure
The test point is clearly outside of the test contour, but the result of PointInsidePen
is True
.
from fontTools.pens.pointInsidePen import PointInsidePen
def testContour(pen):
pen.moveTo( (727.546875, 697.0) )
pen.curveTo( (722.953125, 697.953125), (718.109375, 698.515625), (712.9375, 698.515625) )
pen.lineTo( (504.375, 698.515625) )
pen.curveTo( (487.328125, 719.359375), (507.84375, 783.140625), (555.796875, 783.140625) )
pen.lineTo( (717.96875, 783.140625) )
pen.curveTo( (738.890625, 783.140625), (748.796875, 711.5), (727.546875, 697.0) )
pen.closePath()
testPt = (416.625, 783.140625)
piPen = PointInsidePen(None, testPt)
testContour(piPen)
print piPen.getResult()
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 30 (16 by maintainers)
Commits related to this issue
- Fix PointInsidePen https://github.com/behdad/fonttools/issues/621 — committed to fonttools/fonttools by behdad 8 years ago
- Make solveCubic() more robust Fixes https://github.com/behdad/fonttools/issues/621#issuecomment-226671968 — committed to fonttools/fonttools by behdad 8 years ago
- pointInsidePen: add getWinding() Resolves https://github.com/behdad/fonttools/issues/621#issuecomment-234764830 Although, leaving contours left open is out of protocol behavior IMO. — committed to fonttools/fonttools by behdad 8 years ago
- pointInsidePen: Disallow endPath() https://github.com/behdad/fonttools/issues/621#issuecomment-234764830 — committed to fonttools/fonttools by behdad 8 years ago
Passing again. Hopefully this one will stick for a while.