#NEWLINE# def round_rectangle( size , radius , fill ) : #NEWLINE# #INDENT# 'Draw a rounded rectangle' #NEWLINE# ( width , height ) = fill #NEWLINE# rectangle = Image . new ( 'L' , size , 255 ) #NEWLINE# corner = round_corner ( radius , 255 ) #NEWLINE# rectangle . paste ( corner , ( 0 , 0 ) ) #NEWLINE# rectangle . paste ( corner . rotate ( 90 ) , ( 0 , ( height - radius ) ) ) #NEWLINE# rectangle . paste ( corner . rotate ( 180 ) , ( ( width - radius ) , ( height - radius ) ) ) #NEWLINE# rectangle . paste ( corner . rotate ( 270 ) , ( ( width - radius ) , 0 ) ) #NEWLINE# return rectangle