From 3ea814b0452b2138d0af96013757a328fe2e0948 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Wed, 3 Nov 2010 17:38:18 -0400 Subject: [PATCH] add testcanvas --- examples/testcanvas.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/testcanvas.py diff --git a/examples/testcanvas.py b/examples/testcanvas.py new file mode 100644 index 000000000..a216ae927 --- /dev/null +++ b/examples/testcanvas.py @@ -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() +