mirror of https://github.com/kivy/kivy.git
add testcanvas
This commit is contained in:
parent
4107ea1f0b
commit
3ea814b045
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue