Advertisement
iful99

GERAK DI CANVAS1

Nov 10th, 2014
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from appuifw import app,Canvas
  2. from graphics import Image
  3. from e32 import ao_sleep as a0
  4.  
  5. def quit():global run;run=0
  6. app.exit_key_handler = quit
  7. app.screen='full'
  8. app.body=c=Canvas()
  9. ly=c.size
  10. im=Image.new(ly)
  11.  
  12. x=1
  13. def jalan():
  14.   global x
  15.   x+=5
  16.   if x>=max(ly):x=1
  17.  
  18. def gambar():
  19.   im.text((x,50),u'PYS60',0xFFFF00,(u'',20))
  20.   im.ellipse((x,80,x+30,110),fill=0x0f0f0)
  21.  
  22. run=1
  23. while run:
  24.   im.clear(0x1e1e1e)
  25.   jalan()
  26.   gambar()
  27.   c.blit(im)
  28.   a0(0.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement