#NEWLINE# def _write( self , ch , fg , bg ) : #NEWLINE# #INDENT# if ( self . x == self . width ) : #NEWLINE# #INDENT# self . x = 0 #NEWLINE# self . y += 1 #NEWLINE# if ( self . y == self . height ) : #NEWLINE# #INDENT# [ self . canvas . move ( x , 0 , ( - fontHeight ) ) for x in self . canvas . find_all ( ) ] #NEWLINE# self . y -= 1 #NEWLINE# #UNINDENT# #UNINDENT# canvasX = ( ( self . x * fontWidth ) + 1 ) #NEWLINE# canvasY = ( ( self . y * fontHeight ) + 1 ) #NEWLINE# items = self . canvas . find_overlapping ( canvasX , canvasY , ( canvasX + 2 ) , ( canvasY + 2 ) ) #NEWLINE# if items : #NEWLINE# #INDENT# [ self . canvas . delete ( item ) for item in items ] #NEWLINE# #UNINDENT# if bg : #NEWLINE# #INDENT# self . canvas . create_rectangle ( canvasX , canvasY , ( ( canvasX + fontWidth ) - 1 ) , ( ( x + fontHeight ) - 1 ) , fill = bg , outline = bg ) #NEWLINE# #UNINDENT# self . canvas . create_text ( canvasX , canvasY , anchor = Tkinter . NW , font = ttyFont , text = ch , fill = fg ) #NEWLINE# self . x += 1