All pastes #90585 Raw Edit

Stuff

public text v1 · immutable
#90585 ·published 2006-07-17 20:45 UTC
rendered paste body
import kaa.canvas
import kaa.display
import kaa.notifier

canvas = kaa.canvas.X11Canvas((800,600), use_gl=False)

background = None
hello = None

def update():
    global background
    global hello

    if background:
        background.unparent()
    if hello:
        hello.unparent()
        
    background = kaa.canvas.Image("data/background.jpg")
    canvas.add_child(background)

    hello = kaa.canvas.Text("Hello world!")
    hello.move(hcenter = "50%", vcenter = "50%")
    canvas.add_child(hello, width=30)

kaa.notifier.Timer(update).start(0.1)
kaa.main()
print 'x'