#NEWLINE# def manipulateACanvas( self , canvas ) : #NEWLINE# #INDENT# canvas . reposition ( * rndpt ( self . width , self . height ) ) #NEWLINE# canvas . S = S = canvas . sound ( 'http://localhost/amen.mp3' ) #NEWLINE# S . play ( timesLoop = 5 ) #NEWLINE# for x in range ( random . randint ( 1 , 4 ) ) : #NEWLINE# #INDENT# canvas . pen ( random . randint ( 1 , 10 ) , random . randint ( 0 , 16777215 ) , random . randint ( 0 , 100 ) ) #NEWLINE# canvas . move ( * rndpt ( self . width , self . height ) ) #NEWLINE# choice = random . randint ( 0 , 4 ) #NEWLINE# if ( choice == 0 ) : #NEWLINE# #INDENT# canvas . line ( * rndpt ( self . width , self . height ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( choice == 1 ) : #NEWLINE# #INDENT# canvas . fill ( random . randint ( 0 , 16777215 ) , random . randint ( 0 , 100 ) ) #NEWLINE# for x in range ( random . randint ( 3 , 20 ) ) : #NEWLINE# #INDENT# if random . randint ( 0 , 1 ) : #NEWLINE# #INDENT# canvas . line ( * rndpt ( self . width , self . height ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# canvas . curve ( * rndrct ( self . width , self . height ) ) #NEWLINE# #UNINDENT# #UNINDENT# canvas . close ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( choice == 2 ) : #NEWLINE# #INDENT# canvas . curve ( * rndrct ( self . width , self . height ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( choice == 3 ) : #NEWLINE# #INDENT# T = canvas . text ( random . choice ( self . original ) , * ( 0 , 0 , 400 , 100 ) ) #NEWLINE# Textorizer ( T , self . width , self . height ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# continue #NEWLINE# imgname = random . choice ( os . listdir ( 'flsh/images' ) ) #NEWLINE# I = canvas . image ( ( '/images/%s' % imgname ) ) #NEWLINE# I . scale ( * rndp ( ) ) #NEWLINE# I . alpha ( random . randint ( 0 , 100 ) ) #NEWLINE# rotate = random . randint ( ( - 180 ) , 180 ) #NEWLINE# I . rotate ( rotate ) #NEWLINE# I . move ( * rndpt ( self . width , self . height ) )