#NEWLINE# def renderAnnotation( self , annotation , loc , xCenter , yCenter , symWidth , symHeight , symbol ) : #NEWLINE# #INDENT# widthUpperBound = annotation . getWidthUpperBound ( ) #NEWLINE# upLeftX = loc . getUpperLeftX ( xCenter , widthUpperBound , abs ( symWidth ) ) #NEWLINE# heightUpperBound = annotation . getHeightUpperBound ( ) #NEWLINE# upLeftY = loc . getUpperLeftY ( yCenter , heightUpperBound , abs ( symHeight ) ) #NEWLINE# alignedLabel = self . getNextOrNewAlignedLabel ( annotation . getFontSize ( ) , annotation . getFontStyle ( ) , annotation . getFontWeight ( ) , annotation . getFontColor ( ) , loc . getHorizontalAlignment ( ) , loc . getVerticalAlignment ( ) , annotation . getText ( ) , annotation . isHTML ( ) , annotation . getWidget ( ) ) #NEWLINE# if ( loc . getHorizontalAlignment ( ) != HasHorizontalAlignment . ALIGN_LEFT ) : #NEWLINE# #INDENT# alignedLabel . setWidth ( ( str ( widthUpperBound ) + 'px' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# alignedLabel . setWidth ( '' ) #NEWLINE# #UNINDENT# if ( loc . getVerticalAlignment ( ) != HasVerticalAlignment . ALIGN_TOP ) : #NEWLINE# #INDENT# alignedLabel . setHeight ( ( str ( heightUpperBound ) + 'px' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# alignedLabel . setHeight ( '' ) #NEWLINE# #UNINDENT# self . setLabelPosition ( alignedLabel , upLeftY , upLeftY )