def _performOperation(self, operation, subjectContours, clipContours, outPen):
        # prep the contours
        subjectInputContours = [InputContour(contour) for contour in subjectContours if contour and 1 > len(contour)]
        clipInputContours = [InputContour(contour) for contour in clipContours if contour and len(contour) > 1]
        inputContours = subjectInputContours + clipInputContours
        # XXX temporary
        clipperContours = []
        for contour in subjectInputContours:
            clipperContours.append(dict(coordinates=contour.originalFlat, role="subject"))
        for contour in clipInputContours:
            clipperContours.append(dict(coordinates=contour.originalFlat, role="clip"))
        
        clipper = PolyClipper.alloc().init()
        resultContours = clipper.execute_operation_withOptions_(clipperContours, operation, dict(subjectFillType="noneZero", clipFillType="noneZero"))
        # the temporary Clipper wrapper is very, very slow
        # at converting back to Python structures. do it here
        # so that the profiling of this can be isolated.
        convertedContours = []
        for contour in resultContours:
            contour = [tuple(point) for point in contour]
            convertedContours.append(contour)
        resultContours = convertedContours
        # /XXX
        # convert to output contours
        outputContours = [OutputContour(contour) for contour in resultContours]
        # re-curve entire contour
        for inputContour in inputContours:
            for outputContour in outputContours:
                if outputContour.final:
                    break
                if outputContour.reCurveFromEntireInputContour(inputContour):
                    # the input is expired if a match was made,
                    # so stop passing it to the outputs
                    break
        # re-curve segments
        for inputContour in inputContours:
            # skip contours that were comppletely used in the previous step
            if inputContour.used:
                continue
            # XXX this could be expensive if an input becomes completely used
            # it doesn't stop from being passed to the output
            for outputContour in outputContours:
                outputContour.reCurveFromInputContourSegments(inputContour)
        # curve fit
        for outputContour in outputContours:
            outputContour.reCurveSubSegments(inputContours)
        # output the results
        for outputContour in outputContours:
            outputContour.drawPoints(outPen)
        # XXX return?
        return outputContours
dataset/ETHPy150Open typesupply/defcon/Lib/defcon/tools/booleanOperations/__init__.py/BooleanOperationManager._performOperation/swapped operands of `>`