fontTools.pens.pointInsidePen
index
/home/mcfletch/pylive/fontTools/pens/pointInsidePen.py

fontTools.pens.pointInsidePen -- Pen implementing "point inside" testing
for shapes.

 
Classes
       
BasePen(AbstractPen)
PointInsidePen

 
class PointInsidePen(BasePen)
    This pen implements "point inside" testing: to test whether
a given point lies inside the shape (black) or outside (white).
Instances of this class can be recycled, as long as the
setTestPoint() method is used to set the new point to test.
 
Typical usage:
 
        pen = PointInsidePen(glyphSet, (100, 200))
        outline.draw(pen)
        isInside = pen.getResult()
 
Both the even-odd algorithm and the non-zero-winding-rule
algorithm are implemented. The latter is the default, specify
True for the evenOdd argument of __init__ or setTestPoint
to use the even-odd algorithm.
 
 
Method resolution order:
PointInsidePen
BasePen
AbstractPen

Methods defined here:
__init__(self, glyphSet, testPoint, evenOdd=0)
getResult(self)
After the shape has been drawn, getResult() returns True if the test
point lies within the (black) shape, and False if it doesn't.
setTestPoint(self, testPoint, evenOdd=0)
Set the point to test. Call this _before_ the outline gets drawn.

Methods inherited from BasePen:
addComponent(self, glyphName, transformation)
This default implementation simply transforms the points
of the base glyph and draws it onto self.
closePath(self)
curveTo(self, *points)
endPath(self)
lineTo(self, pt)
moveTo(self, pt)
qCurveTo(self, *points)

 
Data
        EPSILON = 1e-10
ONE_PLUS_EPSILON = 1.0000000001
ZERO_MINUS_EPSILON = -1e-10
__all__ = ['PointInsidePen']
__file__ = '/home/mcfletch/pylive/fontTools/pens/pointInsidePen.pyc'
__name__ = 'fontTools.pens.pointInsidePen'
__package__ = 'fontTools.pens'