作为项目的一部分,我获得了以下代码:
class One (Widget):
def _init_(self, **kwargs):
lib.kwargs.set_kwargs(self, **kwargs)
super(One, self)._init_(**kwargs)
# Widget position
self.pos = (lib.config.viewport[self.clientIdIndex][0], 0)
self.width = lib.config.viewport[self.clientIdIndex][1]
self.background_path = "images/bgs/" + str(self.clientIdIndex + 1) + ".jpg"
self.threshold_reachedMessageSent = False
self.last_touch = 0
self.points = []
# ZoneOfInterest
self.shapes = []
for zi in lib.config.zones_of_interest[self.clientIdIndex]:
self.shapes.append( ZoneOfInterest( img=kivy.core.image.Image(zi[0]),
pos=zi[1],
alpha_index=1))
当我想要运行它时,我在屏幕上看不到它应该显示的客户ID. 我得到了一个错误,并且忽略了Alpha分量.