add testcanvas

This commit is contained in:
Mathieu Virbel 2010-11-03 17:38:18 -04:00
parent 4107ea1f0b
commit 3ea814b045
1 changed files with 18 additions and 0 deletions

18
examples/testcanvas.py Normal file
View File

@ -0,0 +1,18 @@
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()