2010-11-04 16:32:10 +00:00
|
|
|
from kivy.app import App
|
2010-11-06 05:27:41 +00:00
|
|
|
from kivy.clock import Clock
|
2010-11-06 03:14:23 +00:00
|
|
|
from kivy.uix.widget import Widget
|
2010-11-05 23:25:13 +00:00
|
|
|
from kivy.uix.button import Button
|
2010-11-06 03:14:23 +00:00
|
|
|
from kivy.uix.label import Label
|
2010-11-07 00:58:04 +00:00
|
|
|
from kivy.uix.video import Video
|
2010-11-18 04:38:40 +00:00
|
|
|
from kivy.core.image import Image
|
2010-11-06 03:14:23 +00:00
|
|
|
from kivy.graphics import *
|
|
|
|
|
2010-11-06 05:27:41 +00:00
|
|
|
from random import random
|
2010-11-04 16:32:10 +00:00
|
|
|
|
2010-11-18 04:38:40 +00:00
|
|
|
|
|
|
|
tex = Image('examples/kivy.jpg').texture
|
2010-11-04 16:32:10 +00:00
|
|
|
class TestApp(App):
|
|
|
|
def build(self):
|
2010-11-16 23:00:57 +00:00
|
|
|
w = Widget()
|
|
|
|
with w.canvas:
|
2010-11-17 05:15:26 +00:00
|
|
|
Color(0,1,0,1)
|
2010-11-18 04:38:40 +00:00
|
|
|
Ellipse(texture=tex)
|
|
|
|
Rectangle(pos=(300,300))
|
2010-11-16 23:00:57 +00:00
|
|
|
|
|
|
|
return w
|
2010-11-04 16:32:10 +00:00
|
|
|
|
|
|
|
TestApp().run()
|