From 792dd4d7139f9080bf6d3d760efe763b8b3f60cc Mon Sep 17 00:00:00 2001 From: dxiao Date: Sun, 20 Feb 2011 16:18:43 -0500 Subject: Added LocationMask, which limits affected pixels to a specified region of the screen --- pixelmappers/C5SignMapper.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'pixelmappers') diff --git a/pixelmappers/C5SignMapper.py b/pixelmappers/C5SignMapper.py index 24631c4..6d5163d 100644 --- a/pixelmappers/C5SignMapper.py +++ b/pixelmappers/C5SignMapper.py @@ -98,8 +98,15 @@ class C5SignMapper(PixelMapper): eventLocSplit = eventLocation.split('@') if len(eventLocSplit) == 2: [eventLocation, signPart] = eventLocSplit - signParts = signPart.split('.') - pixelLocs = signPosition[signParts[0]][signParts[1]] + signParts = signPart.split(' ') + #print "*******************" + #print signParts + pixelLocs = [] + for part in signParts: + if len(part) > 0: + parts = part.split('.') + pixelLocs.extend(self.signPosition[parts[0]][parts[1]]) + #print pixelLocs screenPixels = [p for p in screen if (p.location in pixelLocs)] else: screenPixels = [p for p in screen] -- cgit v1.2.3