

def realizeSymbol(self, pp, grp, arp, symbol, annotation, onY2, clipPlotArea, clipDecoratedChart, drawMainSymbol, x, y, prevX, prevY, nextX, nextY):
    if ((Double.NaN == x) or (Double.NaN == y)):
        return
    spacing = symbol.getFillSpacing()
    thickness = symbol.getFillThickness()
    canvas = grp.getCanvas()
    if ((0 == spacing) and (None != canvas) and (thickness > 0)):
        BOX_CENTER.realizeSymbol(pp, grp, arp, symbol, annotation, onY2, clipPlotArea, clipDecoratedChart, drawMainSymbol, x, y, prevX, prevY, nextX, nextY)
        return
    xPx = pp.xToPixel(x)
    yPx = pp.yToPixel(y, onY2)
    nextXPx = pp.xToPixel(nextX)
    nextYPx = pp.yToPixel(nextY, onY2)
    if ((not (Double.NaN == nextX)) and (not (Double.NaN == nextY)) and (thickness > 0) and ((x != nextX) or (y != nextY))):
        if (0 == spacing):
            spacing = 1
        deltaX = (nextXPx - xPx)
        deltaY = (nextYPx - yPx)
        dXIsShorter = ((deltaX * deltaX) < (deltaY * deltaY))
        EPS = 1
        if (deltaX == 0):
            self.realizeOneImageOfSymbol(pp, grp, arp, symbol, None, onY2, clipPlotArea, clipDecoratedChart, xPx, (0.5 * (yPx + nextYPx)), Double.NaN, Double.NaN, nextXPx, nextYPx, thickness, (abs((nextYPx - yPx)) + EPS))
        elif (deltaY == 0):
            self.realizeOneImageOfSymbol(pp, grp, arp, symbol, None, onY2, clipPlotArea, clipDecoratedChart, (0.5 * (xPx + nextXPx)), yPx, Double.NaN, Double.NaN, nextXPx, nextYPx, (abs((nextXPx - xPx)) + EPS), thickness)
        elif dXIsShorter:
            xMin = min(xPx, nextXPx)
            xMax = max(xPx, nextXPx)
            yAtXMin = min(xPx, nextXPx)
            yAtXMax = max(xPx, nextXPx)
            xiPrev = xMin
            yiPrev = yAtXMin
            xi = xiPrev
            yi = yiPrev
            N = int(math.ceil(((xMax - xMin) / spacing)))
            dy = (abs(((yAtXMax - yAtXMin) / N)) + EPS)
            for i in range(1, N):
                xi = (xMin + ((i * (xMax - xMin)) / N))
                yi = (yAtXMin + ((i * (yAtXMax - yAtXMin)) / N))
                self.realizeOneImageOfSymbol(pp, grp, arp, symbol, None, onY2, clipPlotArea, clipDecoratedChart, (0.5 * (xiPrev + xi)), (0.5 * (yiPrev + yi)), Double.NaN, Double.NaN, nextXPx, nextYPx, thickness, dy)
                xiPrev = xi
                yiPrev = yi
        else:
            yMin = min(yPx, nextYPx)
            yMax = max(yPx, nextYPx)
            xAtYMin = min(yPx, nextYPx)
            xAtYMax = max(yPx, nextYPx)
            xiPrev = xAtYMin
            yiPrev = yMin
            xi = xiPrev
            yi = yiPrev
            N = int(math.ceil(((yMax - yMin) / spacing)))
            dx = (abs(((xAtYMax - xAtYMin) / N)) + EPS)
            for i in range(1, N):
                yi = (yMin + ((i * (yMax - yMin)) / N))
                xi = (xAtYMin + ((i * (xAtYMax - xAtYMin)) / N))
                self.realizeOneImageOfSymbol(pp, grp, arp, symbol, None, onY2, clipPlotArea, clipDecoratedChart, (0.5 * (xiPrev + xi)), (0.5 * (yiPrev + yi)), Double.NaN, Double.NaN, nextXPx, nextYPx, dx, thickness)
                xiPrev = xi
                yiPrev = yi
    if drawMainSymbol:
        w = symbol.getWidth(pp)
        h = symbol.getHeight(pp, onY2)
        self.realizeOneImageOfSymbol(pp, grp, arp, symbol, annotation, onY2, clipPlotArea, clipDecoratedChart, xPx, yPx, Double.NaN, Double.NaN, nextXPx, nextYPx, w, h)

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