Advertisement
here2share

# arc_demo.py

Jan 9th, 2015
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # arc_demo.py
  2.  
  3. import appuifw, e32, graphics
  4. import math
  5.  
  6. def draw(rect):
  7.     try: canvas.blit(img)
  8.     except: pass
  9.  
  10. def quit():
  11.     script_lock.signal()
  12.  
  13. canvas = appuifw.Canvas(redraw_callback=draw)
  14. appuifw.app.directional_pad=False
  15. appuifw.app.orientation='portrait'
  16. appuifw.app.screen='large'
  17. appuifw.app.body=canvas
  18. w,h = canvas.size
  19. img=graphics.Image.new((w,h))
  20.  
  21. img.clear((255,255,255))
  22.  
  23. appuifw.app.exit_key_handler = quit
  24.  
  25. img.arc(((50,50), (300,300)), math.pi/2, 0, width=30, outline=(0,255,0))
  26. draw(())
  27.  
  28. lock = e32.Ao_lock()
  29. appuifw.app.exit_key_handler = lambda:lock.signal()
  30. lock.wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement