Advertisement
iful99

blajar body canvas

Aug 5th, 2015
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. #testing
  2. #6-8-2015
  3.  
  4. import appuifw as A
  5. import graphics as G
  6.  
  7. def quit(): lock.signal()
  8. lock = A.e32.Ao_lock()
  9.  
  10.  
  11. def gbr():
  12.  A.app.screen = 'full'
  13.  A.app.body = c = A.Canvas()
  14.  A.app.exit_key_handler = quit
  15.  im = G.Image.new(c.size)
  16.  x1 = c.size[0]/16
  17.  x2 = c.size[0]-c.size[0]/16
  18.  y1 = c.size[1]/16
  19.  y2 = c.size[1]-c.size[1]/16
  20.  im.clear(0)
  21.  im.rectangle((x1,y1,x2,y2),0xffff,fill=0xff)
  22.  c.blit(im)
  23.  im.save(u'e:\\tamvan.png')
  24.  
  25.  
  26. gbr()
  27. lock.wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement