1 from Renderer import Renderer
3 from enigma import eCanvas, eRect, gRGB
5 class Canvas(Renderer):
9 Renderer.__init__(self)
13 def pull_updates(self):
14 if self.instance is None:
17 # do an incremental update
18 list = self.source.drawlist
22 # if the lists sequence count changed, re-start from begin
23 if list[0] != self.sequence:
24 self.sequence = list[0]
27 self.draw(list[1][self.draw_count:])
28 self.draw_count = len(list[1])
33 self.instance.fillRect(eRect(l[1], l[2], l[3], l[4]), gRGB(l[5]))
35 self.instance.writeText(eRect(l[1], l[2], l[3], l[4]), gRGB(l[5]), gRGB(l[6]), l[7], l[8], l[9])
37 print "drawlist entry:", l
38 raise "invalid drawlist entry"
40 def changed(self, what):
43 def postWidgetCreate(self, instance):
46 from enigma import eSize
50 return eSize(int(x), int(y))
52 for (attrib, value) in self.skinAttributes:
54 self.instance.setSize(parseSize(value))