kivy/examples/testcanvas.py

19 lines
245 B
Python
Raw Normal View History

2010-11-03 21:38:18 +00:00
from kivy.base import runTouchApp
from kivy.core.window import Window
from kivy.graphics import Canvas, Rectangle
c = Canvas()
'''
with c:
Rectangle(size=(100, 100))
'''
def draw():
c.draw()
Window.bind(on_draw=draw)
runTouchApp()