diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-07-19 23:48:55 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-07-19 23:48:55 +0000 |
| commit | c479beea7cc338380a38e29ae041c03b2c299ac1 (patch) | |
| tree | 54a2173395f0f15d27f54ed3e9cf5efa9fc136c9 /lib/python/Components/Sources/CanvasSource.py | |
| parent | 4a8afa26612c40ba5c9c48d42e15abe8bcec2b98 (diff) | |
| download | enigma2-c479beea7cc338380a38e29ae041c03b2c299ac1.tar.gz enigma2-c479beea7cc338380a38e29ae041c03b2c299ac1.zip | |
add 'canvas' gui element where you can draw into a pixmap from python
Diffstat (limited to 'lib/python/Components/Sources/CanvasSource.py')
| -rw-r--r-- | lib/python/Components/Sources/CanvasSource.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/python/Components/Sources/CanvasSource.py b/lib/python/Components/Sources/CanvasSource.py new file mode 100644 index 00000000..4fd0e02a --- /dev/null +++ b/lib/python/Components/Sources/CanvasSource.py @@ -0,0 +1,20 @@ +from Source import Source + +class CanvasSource(Source): + def __init__(self): + Source.__init__(self) + self.sequence = 0 + self.clear() + + def clear(self): + self.sequence += 1 + self._drawlist = (self.sequence, [ ]) + + def get_drawlist(self): + return self._drawlist + + drawlist = property(get_drawlist) + + def fill(self, x, y, width, height, color): + self.drawlist[1].append( (1, x, y, width, height, color) ) + self.changed() |
