Advertisement
iful99

CANVAS4

Nov 10th, 2014
382
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. from random import randint
  5.  
  6. def quit():global run;run=0
  7. app.exit_key_handler=quit
  8. app.screen = 'full'
  9. app.body = c = Canvas()
  10. ly=c.size
  11. im=Image.new(ly)
  12. acak=0xffffff
  13. def gambar():
  14.   im.point((50,50),0xff00ff,width=50)
  15.   im.rectangle((10,90,200,200),fill=0xffff00)
  16.   im.line((10,10,200,10),0x00ff00,width=5)
  17.   im.polygon((133,70,200,70,167,30),fill=0xffffff)
  18.   im.ellipse((100,20,120,75),fill=0x00f0f0)
  19. run=1
  20. while run:
  21.   acak=randint(0,0xffffff)
  22.   im.clear(acak)
  23.   gambar()
  24.   c.blit(im)
  25.   a0(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement