

def realizeOneImageOfSymbol(self, pp, grp, arp, symbol, annotation, onY2, clipPlotArea, clipDecoratedChart, xPx, yPx, prevXPx, prevYPx, nextXPx, nextYPx, width, height):
    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)
    symWidth = self.getAdjustedWidth(width, xPx, prevXPx, nextXPx, xMinPx, xMaxPx, xMidPx)
    if (Double.NaN == symWidth):
        return
    xLeft = self.getUpperLeftX(width, xPx, prevXPx, nextXPx, xMinPx, xMaxPx, xMidPx, pp.getXMousePlotArea())
    if (Double.NaN == xLeft):
        return
    xCenter = (xLeft + (symWidth / 2.0))
    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)
    symHeight = self.getAdjustedHeight(height, yPx, prevYPx, nextYPx, yMinPx, yMaxPx, yMidPx)
    if (Double.NaN == symHeight):
        return
    yTop = self.getUpperLeftY(height, yPx, prevYPx, nextYPx, yMinPx, yMaxPx, yMidPx, pp.getYMousePlotArea())
    if (Double.NaN == yTop):
        return
    yCenter = (yTop + (symHeight / 2.0))
    if (clipPlotArea and (not self.intersects(xMinPx, yMinPx, xMaxPx, yMaxPx, xLeft, yTop, (xLeft + symWidth), (yTop + symHeight)))):
        return
    elif clipDecoratedChart:
        yAxisWidth = pp.getYAxisEnsembleWidth()
        titleThickness = pp.chartTitleThickness()
        if (not self.intersects((xMinPx - yAxisWidth), (yMinPx - titleThickness), (pp.getXChartSizeDecoratedQuickly() - yAxisWidth), (pp.getYChartSizeDecoratedQuickly() - titleThickness), xLeft, yTop, (xLeft + symWidth), (yTop + symHeight))):
            return
    signWidth = 1
    if (symWidth < 0):
        xLeft = (xLeft + symWidth)
        symWidth *= (- 1)
        signWidth = (- 1)
    signHeight = 1
    if (symHeight < 0):
        yTop = (yTop + symHeight)
        symHeight *= (- 1)
        signHeight = (- 1)
    if (symWidth != 0):
        xLeft -= self.pixelPadLeft
        symWidth += (self.pixelPadLeft + self.pixelPadRight)
    if (symHeight != 0):
        yTop -= self.pixelPadTop
        symHeight += (self.pixelPadTop + self.pixelPadBottom)
    borderWidth = symbol.getBorderWidth()
    if (((symWidth > 0) and (symHeight > 0)) or (borderWidth < 0)):
        grp.renderBorderedImage(symbol.getBackgroundColorCSS(), symbol.getBorderColorCSS(), symbol.getBorderStyle(), borderWidth, symWidth, symHeight, xLeft, yTop, symbol.getImageURL())
    if ((annotation != None) and ((annotation.getText() is not None) or (annotation.getWidget() is not None)) and annotation.getVisible()):
        loc = annotation.getLocation()
        if (None == loc):
            loc = self.defaultAnnotationLocation()
        loc = AnnotationLocation.transform(loc, signWidth, signHeight)
        arp.renderAnnotation(annotation, loc, (xCenter + (signWidth * annotation.getXShift())), (yCenter - (signHeight * annotation.getYShift())), symWidth, symHeight, symbol)

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