Advertisement
phjoe

Grad

Dec 15th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import appuifw as A
  2. import graphics
  3.  
  4. run=1
  5. def stop():
  6.  global run
  7.  run=0
  8.  
  9. A.app.screen='full'
  10. A.app.body=c=A.Canvas()
  11. A.app.exit_key_handler=stop
  12. w,h=c.size
  13. img=graphics.Image.new((w,h))
  14.  
  15.  
  16. def grad():
  17.  for i in xrange(h):
  18.   img.line((0,i,w,i),(0,i,0))
  19.  
  20. while run:
  21.  grad()
  22.  c.blit(img)
  23.  A.e32.ao_sleep(1e-04)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement