×
Namespaces

Variants
Actions
Revision as of 03:11, 24 January 2012 by lpvalente (Talk | contribs)

Archived:Aplicação PySymbian básica com canvas

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

Compatibilidade
Plataforma(s): PySymbian

Artigo
Criado por lpvalente em 05 Aug 2008
Última alteração feita por lpvalente em 24 Jan 2012

Uma aplicação básica para Python que usa o canvas, com tela cheia (fullscreen).

import appuifw
import sysinfo
import graphics
import e32
 
class Basic:
def __init__(self):
appuifw.app.screen = 'full'
self.display_size = sysinfo.display_pixels()
self.img = graphics.Image.new(self.display_size)
self.canvas = appuifw.Canvas(redraw_callback=self.handle_redraw)
appuifw.app.body = self.canvas
appuifw.app.exit_key_handler = self.quit
 
def handle_redraw(self,rect):
self.canvas.blit(self.img)
 
def quit(self):
del self.canvas
lock.signal()
 
lock = e32.Ao_lock()
basic = Basic()
lock.wait()
66 page views in the last 30 days.
×