예제 #1
0
파일: imlib2.py 프로젝트: clones/kaa
from kaa import imlib2, display, main

window = display.X11Window(size = (800, 600), title = "Kaa Display Test")
image = imlib2.open("data/background.jpg")
imlib2.add_font_path("data")
image.draw_text((50, 50), "This is a Kaa Display Imlib2 Test", (255,255,255,255), "VeraBd/24")
window.show()
window.render_imlib2_image(image)
main()
예제 #2
0
파일: evas1.py 프로젝트: pombredanne/kaa
        tx = time.time()
        a = o.color_get()[3]
        if a - 5 < 0:
            tot = time.time() - ts
            etot = kaa.evas.benchmark_get()
            print "- Animation took:", tot, etot, "OVERHEAD=", (tot / etot), " fps:", frames / (time.time() - ts)
            return False
        p = o.geometry_get()[0]
        o.color_set(a=a - 2)
        o.move((p[0] - 2, p[1] - 2))
        tot += time.time() - tx

    # print " - move/fade all:", time.time()-t0
    # print " - gets:", tot
    t0 = time.time()
    e.render()
    # print " - render:", time.time()-t0
    global frames
    frames += 1


def start():
    global ts
    ts = time.time()
    kaa.evas.benchmark_reset()
    kaa.notifier.Timer(update).start(0)


kaa.notifier.OneShotTimer(start).start(2)
kaa.main()