Example #1
0
 def hasOverlap(self):
     bGlyph = BooleanGlyph()
     pen = bGlyph.getPointPen()
     openContours = 0
     for contour in self:
         if not contour.open:
             contour.drawPoints(pen)
         else:
             openContours += 1
     bGlyph.removeOverlap()
     return len(bGlyph.contours) + openContours != len(self)
Example #2
0
 def hasOverlap(self):
     bGlyph = BooleanGlyph()
     pen = bGlyph.getPointPen()
     openContours = 0
     for contour in self:
         if not contour.open:
             contour.drawPoints(pen)
         else:
             openContours += 1
     bGlyph.removeOverlap()
     return len(bGlyph.contours) + openContours != len(self)
Example #3
0
    def removeOverlap(self):
        # TODO: maybe clear undo stack if no changes
        self.prepareUndo()
        bGlyph = BooleanGlyph()
        pen = bGlyph.getPointPen()
        for contour in list(self):
            if not contour.open:
                contour.drawPoints(pen)
                self.removeContour(contour)
            else:
                contour.selected = False
        bGlyph = bGlyph.removeOverlap()
        pen = self.getPointPen()
        for contour in bGlyph.contours:
            contour.drawPoints(pen)

        self.dirty = True
Example #4
0
    def removeOverlap(self):
        # TODO: maybe clear undo stack if no changes
        self.prepareUndo()
        bGlyph = BooleanGlyph()
        pen = bGlyph.getPointPen()
        for contour in list(self):
            if not contour.open:
                contour.drawPoints(pen)
                self.removeContour(contour)
            else:
                contour.selected = False
        bGlyph = bGlyph.removeOverlap()
        pen = self.getPointPen()
        for contour in bGlyph.contours:
            contour.drawPoints(pen)

        self.dirty = True