

def isIntersecting13(self, pp, symbol, prevX, x, nextX, prevY, y, nextY, onY2, top, right, bottom, left):
    xMin = pp.getXMin()
    xMax = pp.getXMax()
    xMid = symbol.getBaseline()
    if (Double.NaN == xMid):
        xMid = ((xMin + xMax) / 2.0)
    xMinPx = pp.xToPixel(xMin)
    xMaxPx = pp.xToPixel(xMax)
    xMidPx = pp.xToPixel(xMid)
    xPx = pp.xToPixel(x)
    prevXPx = pp.xToPixel(prevX)
    nextXPx = pp.xToPixel(nextX)
    width = symbol.getWidth(pp)
    symWidth = self.getAdjustedWidth(width, xPx, prevXPx, nextXPx, xMinPx, xMaxPx, xMidPx)
    if (Double.NaN == symWidth):
        return False
    xLeft = self.getUpperLeftX(width, xPx, prevXPx, nextXPx, xMinPx, xMaxPx, xMidPx, pp.getXMousePlotArea())
    if (Double.NaN == xLeft):
        return False
    if (max(xLeft, (xLeft + symWidth)) < left):
        return False
    elif (min(xLeft, (xLeft + symWidth)) > right):
        return False
    if onY2:
        yMin = pp.getY2Max()
        yMax = pp.getY2Min()
    else:
        yMin = pp.getYMax()
        yMax = pp.getYMin()
    yMid = symbol.getBaseline()
    if (Double.NaN == yMid):
        yMid = ((yMin + yMax) / 2.0)
    yMinPx = pp.yToPixel(yMin, onY2)
    yMaxPx = pp.yToPixel(yMax, onY2)
    yMidPx = pp.yToPixel(yMid, onY2)
    yPx = pp.yToPixel(y, onY2)
    prevYPx = pp.yToPixel(prevY, onY2)
    nextYPx = pp.yToPixel(nextY, onY2)
    height = symbol.getHeight(pp, onY2)
    symHeight = self.getAdjustedHeight(height, yPx, prevYPx, nextYPx, yMinPx, yMaxPx, yMidPx)
    if (Double.NaN == symHeight):
        return False
    yTop = self.getUpperLeftY(height, yPx, prevYPx, nextYPx, yMinPx, yMaxPx, yMidPx, pp.getYMousePlotArea())
    if (Double.NaN == yTop):
        return False
    if (max(yTop, (yTop + symHeight)) < top):
        return False
    elif (min(yTop, (yTop + symHeight)) > bottom):
        return False
    return True

dataset/ETHPy150Open anandology/pyjamas/library/gwt/chart/SymbolType.py SymbolType.isIntersecting13/original