【发布时间】:2015-09-05 17:29:53
【问题描述】:
我正在尝试为应用制作动画。它显示一个错误代码,说构建需要两个参数(1 个给定)。这是我的代码:
from kivy.app import App
from kivy.uix.image import Image
from kivy.animation import Animation
class TheApp(App):
def build(self, instance):
self.instance= instance
image = Image(source= "psychTREE.jpg")
image.allow_stretch= True
animation = Animation(pos= (100, 100), t= "out_bounce")
animation += Animation(pos= (200, 100), t = "out_bounce")
animation &= Animation(size= (500, 500))
animation += Animation(size= (100, 50))
image = animation.start(instance)
return image
if __name__ == "__main__":
TheApp().run()
【问题讨论】: