#NEWLINE# def DrawIcon( self , dc , rect , pane ) : #NEWLINE# #INDENT# '\n        Draws the icon in the pane caption area.\n\n        :param `dc`: a :class:`DC` device context;\n        :param Rect `rect`: the pane caption rectangle;\n        :param `pane`: the pane for which the icon is drawn.\n        ' #NEWLINE# if pane . icon . Ok ( ) : #NEWLINE# #INDENT# if pane . HasCaptionLeft ( ) : #NEWLINE# #INDENT# bmp = wx . ImageFromBitmap ( pane . icon ) . Rotate90 ( clockwise = False ) #NEWLINE# dc . DrawBitmap ( bmp . ConvertToBitmap ( ) , ( rect . x + ( ( rect . width - pane . icon . GetWidth ( ) ) / 2 ) ) , ( ( ( rect . y + rect . height ) - 2 ) - pane . icon . GetHeight ( ) ) , True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# dc . DrawBitmap ( pane . icon , ( self . x + 2 ) , ( rect . y + ( ( rect . height - pane . icon . GetHeight ( ) ) / 2 ) ) , True )