2010-11-05 04:57:00 +00:00
|
|
|
from kivy.app import App
|
|
|
|
from kivy.uix.widget import Widget
|
2010-11-05 16:55:22 +00:00
|
|
|
from kivy.core.image import Image
|
2010-11-04 15:08:30 +00:00
|
|
|
from kivy.graphics import *
|
2010-11-03 21:38:18 +00:00
|
|
|
|
2010-11-05 04:57:00 +00:00
|
|
|
class TestApp(App):
|
|
|
|
def build(self):
|
|
|
|
a = Widget()
|
|
|
|
tex = Image('examples/kivy.jpg').texture
|
|
|
|
tex2 = Image('examples/test.png').texture
|
|
|
|
with a.canvas:
|
2010-11-03 23:59:31 +00:00
|
|
|
|
2010-11-05 19:37:02 +00:00
|
|
|
#Color(1,1,1,1)
|
|
|
|
#Ellipse(pos=(300,100), size=(200,100), texture=tex2)
|
2010-11-06 20:48:59 +00:00
|
|
|
Color(1,0,0,1)
|
2010-11-06 00:17:30 +00:00
|
|
|
Rectangle(texture=tex2)
|
2010-11-05 23:44:12 +00:00
|
|
|
|
2010-11-06 00:17:30 +00:00
|
|
|
#LineWidth(10)
|
|
|
|
#PathStart(300,300)
|
|
|
|
#PathLineTo(200,200)
|
|
|
|
#PathLineTo(300,200)
|
|
|
|
#PathLineTo(300,400)
|
|
|
|
#PathLineTo(200,250)
|
|
|
|
#PathLineTo(100,300)
|
|
|
|
#PathLineTo(150,250)
|
|
|
|
#PathStroke()
|
2010-11-05 04:57:00 +00:00
|
|
|
return a
|
2010-11-03 21:38:18 +00:00
|
|
|
|
2010-11-05 04:57:00 +00:00
|
|
|
TestApp().run()
|