''' Purpose: coloring between the lines ''' from PIL import Image import do def flood( page, spot, c, bg ) : ''' If spot is a colorable pixel on drawing, then all pixel locactions reachable from spot traversing only colorable pixels are painted color c; otherwise, no action is taken ''' pass def sweep( page, bg ) : ''' For every colorable spot on page, a flood() is performed using a random color for each flooding. ''' page_width = do.get_width( page ) page_height = do.get_height( page ) for px in range( 0, page_width ) : for py in range( 0, page_height ) : spot = (px, py) # spot is the current drawing coordinate of # interest # if spot is colorable, generate a random color and start a flood # from there pass if ( __name__ == '__main__' ) : import usa im = usa.color_va() im.show() im = usa.color_usa() im.show()