Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pieslice_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.pieslice(((20,50), (320,350)), 0, math.pi/2,
- width=2, outline=(255,0,0), fill=(255,255,0))
- img.pieslice(((50,300), (320,500)), math.pi/2, math.pi/4,
- fill=(0,0,255))
- 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