add 'canvas' gui element where you can draw into a pixmap from python
[enigma2.git] / lib / python / Components / Sources / CanvasSource.py
1 from Source import Source
2
3 class CanvasSource(Source):
4         def __init__(self):
5                 Source.__init__(self)
6                 self.sequence = 0
7                 self.clear()
8
9         def clear(self):
10                 self.sequence += 1
11                 self._drawlist = (self.sequence, [ ])
12
13         def get_drawlist(self):
14                 return self._drawlist
15
16         drawlist = property(get_drawlist)
17
18         def fill(self, x, y, width, height, color):
19                 self.drawlist[1].append( (1, x, y, width, height, color) )
20                 self.changed()