Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # arc_demo.py
- import appuifw, e32, graphics
- import math
- def draw(rect):
- try: canvas.blit(img)
- except: pass
- def quit():
- script_lock.signal()
- canvas = appuifw.Canvas(redraw_callback=draw)
- appuifw.app.directional_pad=False
- appuifw.app.orientation='portrait'
- appuifw.app.screen='large'
- appuifw.app.body=canvas
- w,h = canvas.size
- img=graphics.Image.new((w,h))
- img.clear((255,255,255))
- appuifw.app.exit_key_handler = quit
- img.arc(((50,50), (300,300)), math.pi/2, 0, width=30, outline=(0,255,0))
- draw(())
- lock = e32.Ao_lock()
- appuifw.app.exit_key_handler = lambda:lock.signal()
- lock.wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement